Mayank1791989 / gql

112 stars 19 forks source link

Multi-line comments/descriptions in schemas #143

Open rdrey opened 6 years ago

rdrey commented 6 years ago

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?

ajhyndman commented 6 years ago

The issue is that gql still only supports graphql@0.9.6.

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

Support for descriptions was only added in graphql@0.12.0.

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.

kumarharsh commented 6 years ago

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

rdrey commented 6 years ago

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!

andrefilimono commented 6 years ago

Are there any updates?

borekb commented 5 years ago

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.

kumarharsh commented 5 years ago

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

AlexSun98 commented 5 years ago

any update yet? @kumarharsh

AlexSun98 commented 5 years ago

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

ShawnCarnell commented 5 years ago

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

miunaliang commented 5 years ago

@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

rdrey commented 4 years ago

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

Maxwell2022 commented 4 years ago

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