Created
June 25, 2022 20:00
-
-
Save hernan604/4e7e7cf150c6c5d13f9422a113bf1ebd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM: https://github.com/tendant/graphql-clj/blob/master/src/graphql.bnf | |
| Document ::= <Ignored> Definition+ <Ignored> | |
| Definition ::= TypeSystemDefinition | OperationDefinition | FragmentDefinition | |
| OperationDefinition ::= <Ignored> OperationType? <Ignored> Name? <Ignored> VariableDefinitions? <Ignored> Directives? SelectionSet | |
| Query ::= "query" | |
| Mutation ::= "mutation" | |
| OperationType ::= Query | Mutation | |
| VariableDefinitions ::= <"("> VariableDefinition+ <")"> | |
| SourceCharacter ::= #"[\x{9}\x{A}\x{D}\x{20}-\uFFFF]" | |
| Ignored ::= Ignore* | |
| Ignore ::= UnicodeBOM | WhiteSpace | LineTerminator | Comment | Comma | |
| UnicodeBOM ::= "\uFEFF" | |
| WhiteSpace ::= #"[\x{9}\x{20}]" | |
| LineTerminator ::= #"\x{A}" | #"\x{D}\x{A}" | #"\x{D}" | |
| CommentChar ::= #"[\x{9}\x{20}-\uFFFF]" | |
| Comment ::= "#" CommentChar* <LineTerminator> | |
| Comma ::= "," | |
| Punctuator ::= #"[!$().:=@\[\]\{\}]" | |
| Name ::= #"[_A-Za-z][_0-9A-Za-z]*" | |
| NegativeSign ::= "-" | |
| NonZeroDigit ::= #"[1-9]" | |
| Digit ::= #"[0-9]" | |
| IntegerPart ::= NegativeSign? '0' | NegativeSign? NonZeroDigit Digit* | |
| IntValue ::= #"[\+\-0-9]+" | |
| FractionalPart ::= "." Digit+ | |
| ExponentIndicator ::= "e" | "E" | |
| Sign ::= "+" | "-" | |
| ExponentPart ::= ExponentIndicator Sign? Digit+ | |
| FloatValue ::= #"[\+\-0-9]+\.[0-9]" | |
| EscapedUnicode ::= #"[0-9A-Fa-f]{4}" | |
| EscapedCharacter ::= "\\" #"[\"\/bfnrt]" | |
| StringCharacter ::= #"[\x{9}\x{20}\x{21}\x{23}-\x{5B}\x{5D}-\uFFFF]" | "\\" "u" EscapedUnicode | "\\" EscapedCharacter | |
| StringValue ::= <"\""><"\""> | <"\""> StringCharacter+ <"\""> | |
| Token ::= Punctuator | Name | IntValue | FloatValue | StringValue | |
| EnumValue ::= #"(?!(true|false|null))[_A-Za-z][_0-9A-Za-z]*" | |
| Value ::= VariableName | IntValue | FloatValue | ListValue | StringValue | BooleanValue | EnumValue | ObjectValue | |
| VariableName ::= <"$"> Name | |
| VariableDefinition ::= <Ignored> VariableName <":"> <Ignored> Type <Ignored> DefaultValue? <Ignored> | |
| TypeName ::= Name | |
| Type ::= TypeName | ListType | NonNullType | |
| ListType ::= <"["> Type <"]"> | |
| NonNullType ::= TypeName <"!"> | ListType <"!"> | |
| DefaultValue ::= <"="> <Ignored> Value | |
| BooleanValue ::= "true" | "false" | |
| ObjectValue ::= <"{"> ObjectField* <"}"> | |
| ObjectField ::= <Ignored> Name <":"> <Ignored> Value <Ignored> | |
| OneOrMoreValue ::= [Value <Ignored>]+ | |
| ListValue ::= <"["> <"]"> | <"["> OneOrMoreValue <"]"> | |
| Directives ::= Directive+ | |
| Directive ::= <"@"> Name Arguments? <Ignored> | |
| Arguments ::= <"("> <Ignored> Argument+ <")"> | |
| ArgumentName ::= Name | |
| Argument ::= ArgumentName <":"> <Ignored> ArgumentValue <Ignored>* | |
| ArgumentValue ::= Value | VariableName | |
| Alias ::= Name <":"> | |
| FragmentDefinition ::= <"fragment"> <Ignored> FragmentName <Ignored> TypeCondition Directives? SelectionSet | |
| FragmentName ::= Name | |
| TypeCondition ::= <"on"> <Ignored> TypeName <Ignored> | |
| SelectionSet ::= <"{"> <Ignored> Selection+ <"}"> <Ignored> | |
| Selection ::= Field <Ignored> | FragmentSpread <Ignored> | InlineFragment <Ignored> | |
| Field ::= Alias? <Ignored> FieldName <Ignored> Arguments? <Ignored> Directives? SelectionSet? | |
| FragmentSpread ::= <"..."> FragmentName <Ignored> Directives? | |
| InlineFragment ::= <"..."> <Ignored> TypeCondition? Directives? SelectionSet | |
| TypeSystemDefinition ::= TypeDefinition | InterfaceDefinition | UnionDefinition | SchemaDefinition | EnumDefinition | InputDefinition | DirectiveDefinition | TypeExtensionDefinition | ScalarDefinition | |
| TypeDefinition ::= <"type"> <Ignored> TypeName <Ignored> Implements? <Ignored> <"{"> <Ignored> TypeFields <Ignored> <"}"> <Ignored> | |
| TypeSystemType ::= "schema" | "scalar" | "type" | "interface" | "union" | "enum" | "input" | "extend" | "directive" | |
| TypeFields ::= TypeField* | |
| FieldName ::= Name | |
| TypeField ::= FieldName TypeFieldArguments? <":"> <Ignored> [TypeFieldType | TypeFieldTypeRequired] <Ignored> | |
| TypeFieldTypeRequired ::= TypeFieldType <"!"> | |
| TypeFieldType ::= TypeName | ListTypeName | |
| ListTypeName ::= <"["> [TypeFieldType | TypeFieldTypeRequired] <"]"> | |
| TypeFieldArguments ::= <"("> TypeFieldArgument+ <")"> | |
| TypeRequired ::= Type <"!"> | |
| TypeFieldArgument ::= ArgumentName <":"> <Ignored> [Type | TypeRequired] <Ignored> TypeFieldArgumentDefault? <Ignored> | |
| TypeFieldArgumentDefault ::= <"="> <Ignored> [StringValue / BooleanValue / IntValue / FloatValue / EnumValue] | |
| Implements ::= <"implements"> <Ignored> TypeNames | |
| UnionDefinition ::= <"union"> <Ignored> TypeName <Ignored> <"="> <Ignored> UnionTypeNames | |
| UnionTypeNames ::= [TypeName <Ignored> | TypeName <Ignored> <"|"> <Ignored>]* | |
| TypeNames ::= [TypeName <Ignored>]* | |
| InterfaceDefinition ::= <"interface"> <Ignored> TypeName <Ignored> <"{"> <Ignored> TypeFields <Ignored> <"}"> <Ignored> | |
| SchemaDefinition ::= <"schema"> <Ignored> <"{"> SchemaTypes <"}"> <Ignored> | |
| SchemaTypes ::= SchemaType+ | |
| SchemaType ::= QueryType | MutationType | |
| QueryType ::= <Ignored> <"query"> <":"> <Ignored> Name <Ignored> | |
| MutationType ::= <Ignored> <"mutation"> <":"> <Ignored> Name <Ignored> | |
| EnumDefinition ::= <"enum"> <Ignored> TypeName <Ignored> <"{"> EnumFields <"}"> <Ignored> | |
| EnumFields ::= EnumField+ | |
| EnumField ::= <Ignored> Name <Ignored> EnumType? | |
| EnumType ::= <"@enum"> EnumTypeInt EnumIntValue <Ignored> | |
| EnumIntValue ::= <"("> <"value:"> <Ignored> IntValue <")"> | |
| EnumTypeInt ::= "Int" | |
| InputDefinition ::= <"input"> <Ignored> TypeName <Ignored> <"{"> <Ignored> InputTypeFields <"}"> <Ignored> | |
| InputTypeFields ::= InputTypeField* | |
| InputTypeField ::= FieldName <":"> <Ignored> [TypeFieldType | TypeFieldTypeRequired] <Ignored> | |
| DirectiveDefinition ::= <"directive"> <Ignored> DirectiveName <Ignored> DirectiveOnName <Ignored> | |
| DirectiveName ::= <"@">TypeName | |
| DirectiveOnName ::= <"on"> <Ignored> TypeName | |
| TypeExtensionDefinition ::= <"extend"> <Ignored> TypeDefinition | |
| ScalarDefinition ::= <"scalar"> <Ignored> TypeName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment