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
How do you define descriptions using type definitions? #100
Comments
@petebrowne I agree 100% that it would be much nicer to have comments turn into descriptions. The reason it doesn't is that we use the parser from graphql-js, and that parser doesn't support it yet. The best way to get it to happen is probably to put your voice behind this PR (or a modified version thereof): graphql/graphql-js#427 |
And to answer your question on how to do this with graphql-tools currently: you have to pass the descriptions in
Please note that for types you have to use |
Thanks for the info! I'll follow the graphql-js parser for updates. |
@peterbrowne: guess what, descriptions just landed in graphql-js 0.7.0. |
@helfer does graphql-tools support the feature now? |
Yep, sure does! |
Just put a comment in the schema above the relevant field. We don't have docs for it yet. |
Hi @tonyxiao, |
@DxCx Oh sweet, thanks for the pointer. I assumed that I needed to upgrade |
great @tonyxiao happy to hear it as i didn't had to the time to test it myself, so i assume we can close this issue =) |
It's not clear how to define type/args descriptions using type definitions - or if it is even possible.
For instance, using vanilla
graphql-js
:I expected this to add descriptions, but it doesn't:
The text was updated successfully, but these errors were encountered: