From ce25934b1f0319962386f338943aafeb7f713541 Mon Sep 17 00:00:00 2001 From: BoD Date: Fri, 4 Jul 2025 15:59:04 +0200 Subject: [PATCH] Add support for descriptions on executable definitions (https://github.com/graphql/graphql-spec/pull/1170) --- src/grammars/GraphQLParser.bnf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/grammars/GraphQLParser.bnf b/src/grammars/GraphQLParser.bnf index fb053e3b..cd9123ff 100644 --- a/src/grammars/GraphQLParser.bnf +++ b/src/grammars/GraphQLParser.bnf @@ -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 <> defaultValue? directives? { - pin=1 +variableDefinition ::= description? variable <> defaultValue? directives? { + pin=2 recoverWhile=variableDefinition_recover methods=[directives="directive"] implements="com.intellij.lang.jsgraphql.psi.GraphQLDirectivesAware" @@ -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 }