Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Graphql enum description #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
drmax24 opened this issue Mar 18, 2025 · 1 comment
Open

Graphql enum description #740

drmax24 opened this issue Mar 18, 2025 · 1 comment

Comments

@drmax24
Copy link

drmax24 commented Mar 18, 2025

How can i specify the description (for schema) for my enum?

@oojacoboo
Copy link
Collaborator

oojacoboo commented Mar 18, 2025

@drmax24 The description implementation in GraphQLite leaves a bit to be desired. I don't believe types currently support descriptions - maybe through the docblock.

GraphQLite originally relied on docblocks to set the description (for some SDEs), and still does for some schema definition elements (operations).

A comprehensive approach needs to be taken to descriptions. All attributes that define a schema definition element should include a description argument. The SchemaFactory should include a setting on whether to default to phpdoc for descriptions (if an attribute doesn't define one and the phpdoc does). Defaulting to phpdoc is a potential security issue with unintended consequences. And, IMO, should be disabled by default. It was a bad design choice.

See #453

A PR on this is very welcomed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants