Skip to content
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

Question about BlockString term #899

Open
sungam3r opened this issue Nov 5, 2021 · 2 comments
Open

Question about BlockString term #899

sungam3r opened this issue Nov 5, 2021 · 2 comments

Comments

@sungam3r
Copy link
Contributor

sungam3r commented Nov 5, 2021

See http://spec.graphql.org/October2021/#sec-Descriptions :

To allow GraphQL service designers to easily publish documentation alongside the
capabilities of a GraphQL service, GraphQL descriptions are defined using the
Markdown syntax (as specified by CommonMark). In the
type system definition language, these description strings (often {BlockString})
occur immediately before the definition they describe.

{BlockString} is used like a reference to some term but I don't see its definition. I can find only single usage of BlockString through the spec. I see BlockStringCharacter term and BlockStringValue function. I suppose that {BlockString} term here is used by mistake and should be changed to just block string.

@benjie
Copy link
Member

benjie commented Nov 5, 2021

Good question @sungam3r; it's a StringValue (http://spec.graphql.org/October2021/#StringValue) but that covers more than just the block string that the content is aiming for. I think it would probably be beneficial to alter the grammar to specifically call out BlockString; so:

StringValue ::
  - `""` [lookahead != `"`]
  - `"` StringCharacter+ `"`
  - BlockString

BlockString :: `"""` BlockStringCharacter* `"""`

That'd also involve changing the spec around this line:

StringValue :: `"""` BlockStringCharacter* `"""`

@sungam3r
Copy link
Contributor Author

sungam3r commented Nov 6, 2021

It makes sense. Then I will probably use the BlockString term in error messages. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants