gql icon indicating copy to clipboard operation
gql copied to clipboard

Multi-line comments/descriptions in schemas

Open rdrey opened this issue 6 years ago • 12 comments

I'm generating a schema with https://github.com/graphql-cli/graphql-cli get-schema, which dumps the schema with multi-line descriptions:

# source: http://0.0.0.0:8000/___graphql
# timestamp: Sat Jul 28 2018 16:32:19 GMT+0000 (Greenwich Mean Time)

schema {
  query: RootQueryType
}

"""
A date string, such as 2007-12-03, compliant with the ISO 8601 standard  for
representation of dates and times using the Gregorian calendar.
"""
scalar Date

I have to remove these descriptions to get gql to work, which makes it hard to simply run graphql get-schema with --watch.

Is this something I haven't configured properly in gql or does gql lack the support for descriptions?

rdrey avatar Jul 28 '18 16:07 rdrey

The issue is that gql still only supports [email protected].

https://github.com/Mayank1791989/gql/blob/master/package.json#L41

Support for descriptions was only added in [email protected].

https://github.com/graphql/graphql-js/releases/tag/v0.12.0

I believe that @Mayank1791989 is working on a v3 branch which will eventually add support for this. But it's been a while, it could be worth someone's time to fork and release a new version while we're waiting.

ajhyndman avatar Jul 28 '18 17:07 ajhyndman

All the recent work is ongoing in the travis branch. If you want to contribute, have a look there first.

kumarharsh avatar Jul 28 '18 18:07 kumarharsh

Thanks! I guess I'll keep this issue open for now for others who might run into this.

Edit: And I didn't realize this project was still so active, thanks!

rdrey avatar Jul 28 '18 18:07 rdrey

Are there any updates?

andrefilimono avatar Aug 27 '18 08:08 andrefilimono

Could someone confirm if this is a root cause for https://github.com/kumarharsh/graphql-for-vscode/issues/130? Are there any workarounds? I guess relying on this library is pretty common & having the schema documented as well.

borekb avatar Jun 27 '19 18:06 borekb

Yes, it is the cause of that. It'll land in 3 weeks.

kumarharsh avatar Jun 27 '19 19:06 kumarharsh

any update yet? @kumarharsh

AlexSun98 avatar Jul 24 '19 03:07 AlexSun98

I just started using the lib graphql-for-vscode and seems the lib doesn't support schema description well. Any update please? the version im using is 1.15.0

AlexSun98 avatar Jul 24 '19 03:07 AlexSun98

@kumarharsh it appears this didn't make it into 1.15.1, either. Is there a branch/revision that does contain this support?

ShawnCarnell avatar Aug 22 '19 23:08 ShawnCarnell

@Mayank1791989 is there any schedule about v3 release? Apollo ecosystem currently only support multiline descriptions and that makes hard to use gql description with this plugin

miunaliang avatar Aug 27 '19 11:08 miunaliang

Sorry about the notifications everyone, I’m pushing buttons in a GitHub client app I don’t understand.

rdrey avatar Oct 05 '19 16:10 rdrey

Does anyone have an update on this issue? I cannot see any update on v3 branches

Maxwell2022 avatar Oct 09 '19 04:10 Maxwell2022