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

Skip to content

Schema documentation (field descriptions, etc.) #289

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

Closed
oojacoboo opened this issue Jul 24, 2020 · 3 comments
Closed

Schema documentation (field descriptions, etc.) #289

oojacoboo opened this issue Jul 24, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@oojacoboo
Copy link
Collaborator

Does GraphQLite support outputting descriptions for fields? I'm not seeing this currently, or how this might work. I realize that the docblock comment is used in other cases - think this is a bad idea too, for the most part, since it can expose internals, particularly on models. And, the descriptions don't make a lot of sense.

So, I guess I'd like to find out what the plan is on the above. It'd be nice to have another arg added to the Field annotation that supports a description. But, overall, I think the lib needs to define how to go about properly documenting the full API. Part of the beauty of GraphQL is that the schema can act as a replacement for something like Swagger. I'd love to be able to leverage the schema more for this purpose.

@oojacoboo oojacoboo changed the title Field descriptions for schema Schema documentation (field descriptions, etc.) Jul 24, 2020
@ghost
Copy link

ghost commented Jul 29, 2020

I desperately need this too!
My team is having a hard time for new developers onboarding who has no idea that is going with our schema.

@moufmouf
Copy link
Member

Hey guys!

I have actually this huge PR that I have a hard time merging, but that provides this feature (among many other features): #269

So just wait a little bit longer and you should have a "description" attribute available in the @field annotation!

@moufmouf
Copy link
Member

I think we can safely close this.
The "description" attribute was added to @field and if not present, the text from the PHPDoc is used.
This is documented in the annotation reference page.

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

No branches or pull requests

2 participants