Skip to content

Add support for descriptions on executable definitions #750

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/grammars/GraphQLParser.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ typedOperationDefinition ::= typedOperationDefinitionHeader selectionSet {
mixin="com.intellij.lang.jsgraphql.psi.impl.GraphQLTypedOperationDefinitionMixin"
}

private typedOperationDefinitionHeader ::= operationType identifier? variableDefinitions? directives? {
pin=1
private typedOperationDefinitionHeader ::= description? operationType identifier? variableDefinitions? directives? {
pin=2
recoverWhile=rootTokens_recover
}

variableDefinitions ::= '(' variableDefinition+ ')' {pin=1 methods=[variableDefinitions="variableDefinition"]}

variableDefinition ::= variable <<colon type>> defaultValue? directives? {
pin=1
variableDefinition ::= description? variable <<colon type>> defaultValue? directives? {
pin=2
recoverWhile=variableDefinition_recover
methods=[directives="directive"]
implements="com.intellij.lang.jsgraphql.psi.GraphQLDirectivesAware"
Expand Down Expand Up @@ -263,8 +263,8 @@ fragmentDefinition ::= fragmentDefinitionHeader selectionSet {
mixin="com.intellij.lang.jsgraphql.psi.impl.GraphQLFragmentDefinitionMixin"
}

private fragmentDefinitionHeader ::= 'fragment' fragmentName typeCondition directives? {
pin=1
private fragmentDefinitionHeader ::= description? 'fragment' fragmentName typeCondition directives? {
pin=2
recoverWhile=rootTokens_recover
}

Expand Down