Handling of double-quoted Descriptions in SDL
See original GitHub issueHi! Maybe I am missing something, but I am getting errors when trying to run snowflaqe --generate off of a more-or-less standard HotChocolate schema.graphql file. There are a number of directives and scalars at the end of the schema file, preceded with comments:
"The `@defer` directive may be provided for fragment spreads and inline fragments to inform the executor to delay the execution of the current fragment to indicate deprioritization of the current fragment. A query with `@defer` directive will cause the request to potentially return multiple responses, where non-deferred data is delivered in the initial response and data deferred is delivered in a subsequent response. `@include` and `@skip` take precedence over `@defer`."
directive @defer("If this argument label has a value other than null, it will be passed on to the result of this defer directive. This label is intended to give client applications a way to identify to which fragment a deferred result belongs to." label: String "Deferred when true." if: Boolean) on FRAGMENT_SPREAD | INLINE_FRAGMENT
"The `@specifiedBy` directive is used within the type system definition language to provide a URL for specifying the behavior of custom scalar definitions."
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR
"The `@stream` directive may be provided for a field of `List` type so that the backend can leverage technology such as asynchronous iterators to provide a partial list in the initial response, and additional list items in subsequent responses. `@include` and `@skip` take precedence over `@stream`."
directive @stream("If this argument label has a value other than null, it will be passed on to the result of this stream directive. This label is intended to give client applications a way to identify to which fragment a streamed result belongs to." label: String "The initial elements that shall be send down to the consumer." initialCount: Int! "Streamed when true." if: Boolean!) on FIELD
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
"The `Long` scalar type represents non-fractional signed whole 64-bit numeric values. Long can represent values between -(2^63) and 2^63 - 1."
scalar Long
The first error I get is
Syntax Error GraphQL (628:1) Unexpected String "The `@defer` directive..."
As far as I understand, those are just Descriptions according to the spec. If I remove them, however, I get the following error:
Expected Name, found String "If this argument label has a value other than null, it will be passed ...
From what I can see in this thread: https://github.com/ChilliCream/hotchocolate/issues/4147#issuecomment-908129090, this SDL is as expected.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
GraphQL Schema Definition Language - SDL
Triple "double quotes" allow you to add line breaks for clearer formatting of lengthier comments. """ I'm a block description.
Read more >Style Guide: Structure Pages
Structure pages should provide basic information about the SDL structures to allow users to most effectively utilize them in their projects. General Guidelines ......
Read more >Schema definition language (SDL) - GraphQL Tutorials
To do that, the SDL lets you add descriptions to both types and fields by writing strings (in quotation marks) directly above them....
Read more >Measurable Scenario Description Language Reference
Using the Measurable Scenario Description Language (M-SDL), ... String types hold a sequence of ASCII characters enclosed in double quotes.
Read more >How To Make A Game #10 : Input Handling in C++ And SDL2 ...
How to handle keyboard input using C++ and SDL2 to move our player around the map. Don't forget to like a subscribe to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks @Yakimych for looking into this. I will look for a fix when time permits 😄
@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