Closed Yakimych closed 2 years ago
Hi @Yakimych it could be that the GraphQL parser that Snowflaqe uses is parsing an older spec of GraphQL. What you could do is download the schema, not as SDL but as JSON. From the README docs about the <schema>
:
A relative path to another JSON file containing the output of the standard Introspection query which you can execute against the backend yourself (this allows for offline verification and type-checking)
Can you give this a try?
Hi @Zaid-Ajaj ,
Thanks for the quick reply! Yep, I've tried it with JSON and it seemed to work fine, it's the SDL that is the problem though.
Hi again @Zaid-Ajaj,
After some quick digging, it looks like you are right - it's only Descriptions that are not parsed correctly. The quoted syntax was introduced in the June 2018 version of the spec: http://spec.graphql.org/June2018/#sec-Descriptions. The older syntax with # Description
works with snowflaqe.
I will update the name of the issue and remove mentions of "Scalars" and "Directives".
Thanks @Yakimych for looking into this. I will look for a fix when time permits 😄
Great, thanks!
@Zaid-Ajaj We've bumped the GraphQL-dotnet package and it seems to have fixed the problem. A PR coming up tonight: https://github.com/danielstarck/Snowflaqe/tree/update-package
Hi! Maybe I am missing something, but I am getting errors when trying to run
snowflaqe --generate
off of a more-or-less standard HotChocolateschema.graphql
file. There are a number of directives and scalars at the end of the schema file, preceded with comments:The first error I get is
As far as I understand, those are just Descriptions according to the spec. If I remove them, however, I get the following error:
From what I can see in this thread: https://github.com/ChilliCream/hotchocolate/issues/4147#issuecomment-908129090, this SDL is as expected.