Const AdditionalRuleKinds
AdditionalRuleKinds: object
Defined in packages/graphql-language-service/src/parser/types.ts:58
ALIASED_FIELD
ALIASED_FIELD: "AliasedField" = "AliasedField"
Defined in packages/graphql-language-service/src/parser/types.ts:59
ARGUMENTS
ARGUMENTS: "Arguments" = "Arguments"
Defined in packages/graphql-language-service/src/parser/types.ts:60
ARGUMENTS_DEF
ARGUMENTS_DEF: "ArgumentsDef" = "ArgumentsDef"
Defined in packages/graphql-language-service/src/parser/types.ts:80
COMMENT
COMMENT: "Comment" = "Comment"
Defined in packages/graphql-language-service/src/parser/types.ts:67
DIRECTIVE_DEF
DIRECTIVE_DEF: "DirectiveDef" = "DirectiveDef"
Defined in packages/graphql-language-service/src/parser/types.ts:82
ENUM_DEF
ENUM_DEF: "EnumDef" = "EnumDef"
Defined in packages/graphql-language-service/src/parser/types.ts:75
ENUM_VALUE
ENUM_VALUE: "EnumValue" = "EnumValue"
Defined in packages/graphql-language-service/src/parser/types.ts:76
EXTEND_DEF
EXTEND_DEF: "ExtendDef" = "ExtendDef"
Defined in packages/graphql-language-service/src/parser/types.ts:81
FIELD_DEF
FIELD_DEF: "FieldDef" = "FieldDef"
Defined in packages/graphql-language-service/src/parser/types.ts:77
IMPLEMENTS
IMPLEMENTS: "Implements" = "Implements"
Defined in packages/graphql-language-service/src/parser/types.ts:83
INPUT_DEF
INPUT_DEF: "InputDef" = "InputDef"
Defined in packages/graphql-language-service/src/parser/types.ts:78
INPUT_VALUE_DEF
INPUT_VALUE_DEF: "InputValueDef" = "InputValueDef"
Defined in packages/graphql-language-service/src/parser/types.ts:79
INTERFACE_DEF
INTERFACE_DEF: "InterfaceDef" = "InterfaceDef"
Defined in packages/graphql-language-service/src/parser/types.ts:73
INVALID
INVALID: "Invalid" = "Invalid"
Defined in packages/graphql-language-service/src/parser/types.ts:66
LIST_VALUE
LIST_VALUE: "ListValue" = "ListValue"
Defined in packages/graphql-language-service/src/parser/types.ts:72
MUTATION
MUTATION: "Mutation" = "Mutation"
Defined in packages/graphql-language-service/src/parser/types.ts:63
OBJECT_TYPE_DEF
OBJECT_TYPE_DEF: "ObjectTypeDef" = "ObjectTypeDef"
Defined in packages/graphql-language-service/src/parser/types.ts:70
OBJECT_VALUE
OBJECT_VALUE: "ObjectValue" = "ObjectValue"
Defined in packages/graphql-language-service/src/parser/types.ts:71
QUERY
QUERY: "Query" = "Query"
Defined in packages/graphql-language-service/src/parser/types.ts:62
SCALAR_DEF
SCALAR_DEF: "ScalarDef" = "ScalarDef"
Defined in packages/graphql-language-service/src/parser/types.ts:69
SCHEMA_DEF
SCHEMA_DEF: "SchemaDef" = "SchemaDef"
Defined in packages/graphql-language-service/src/parser/types.ts:68
SHORT_QUERY
SHORT_QUERY: "ShortQuery" = "ShortQuery"
Defined in packages/graphql-language-service/src/parser/types.ts:61
SUBSCRIPTION
SUBSCRIPTION: "Subscription" = "Subscription"
Defined in packages/graphql-language-service/src/parser/types.ts:64
TYPE
TYPE: "Type" = "Type"
Defined in packages/graphql-language-service/src/parser/types.ts:85
TYPE_CONDITION
TYPE_CONDITION: "TypeCondition" = "TypeCondition"
Defined in packages/graphql-language-service/src/parser/types.ts:65
UNION_DEF
UNION_DEF: "UnionDef" = "UnionDef"
Defined in packages/graphql-language-service/src/parser/types.ts:74
VARIABLE_DEFINITIONS
VARIABLE_DEFINITIONS: "VariableDefinitions" = "VariableDefinitions"
Defined in packages/graphql-language-service/src/parser/types.ts:84
Const ParseRules
ParseRules: object
Defined in packages/graphql-language-service/src/parser/Rules.ts:53
AliasedField
Aliased
Field: Rule [] = [name('property'),p(':'),name('qualifier'),opt('Arguments'),list('Directive'),opt('SelectionSet'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:128
Argument
Argument
: ( string | Rule ) [] = [name('attribute'), p(':'), 'Value']
Defined in packages/graphql-language-service/src/parser/Rules.ts:145
Arguments
Arguments
: Rule [] = [p('('), list('Argument'), p(')')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:144
ArgumentsDef
Arguments
Def: Rule [] = [p('('), list('InputValueDef'), p(')')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:270
BooleanValue
BooleanValue: { style: string ; match: any } [] = [t('Name', 'builtin')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:208
DefaultValue
Default
Value: ( string | Rule ) [] = [p('='), 'Value']
Defined in packages/graphql-language-service/src/parser/Rules.ts:116
Directive
Directive
: Rule [] = [p('@', 'meta'), name('meta'), opt('Arguments')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:221
DirectiveDef
Directive
Def: ( Rule | { style: string ; match: any } ) [] = [word('directive'),p('@', 'meta'),name('meta'),opt('ArgumentsDef'),word('on'),list('DirectiveLocation', p('|')),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:222
DirectiveLocation
Directive
Location: Rule [] = [name('string-2')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:240
Document
Document
: Rule [] = [list('Definition')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:54
EnumDef
Enum
Def: ( Rule | { style: string ; match: any } ) [] = [word('enum'),name('atom'),list('Directive'),p('{'),list('EnumValueDef'),p('}'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:288
EnumValue
Enum
Value: Rule [] = [name('string-2')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:210
EnumValueDef
Enum
ValueDef: Rule [] = [name('string-2'), list('Directive')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:297
ExtendDef
ExtendDef: ( string | { style: string ; match: any } ) [] = [word('extend'), 'ObjectTypeDef']
Defined in packages/graphql-language-service/src/parser/Rules.ts:306
Field
Field
: Rule [] = [name('property'),opt('Arguments'),list('Directive'),opt('SelectionSet'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:137
FieldDef
Field
Def: ( string | Rule ) [] = [name('property'),opt('ArgumentsDef'),p(':'),'Type',list('Directive'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:262
FragmentDefinition
Fragment
Definition: ( string | Rule | { style: string ; match: any } ) [] = [word('fragment'),opt(butNot(name('def'), [word('on')])),'TypeCondition',list('Directive'),'SelectionSet',]
Defined in packages/graphql-language-service/src/parser/Rules.ts:154
FragmentSpread
Fragment
Spread: Rule [] = [p('...'), name('def'), list('Directive')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:146
Implements
Implements
: ( Rule | { style
: string ; match
: any } ) [] = [word('implements'), list('NamedType', p('&'))]
Defined in packages/graphql-language-service/src/parser/Rules.ts:239
InlineFragment
Inline
Fragment: ( string | Rule ) [] = [p('...'),opt('TypeCondition'),list('Directive'),'SelectionSet',]
Defined in packages/graphql-language-service/src/parser/Rules.ts:147
InputDef
Input
Def: ( Rule | { style: string ; match: any } ) [] = [word('input'),name('atom'),list('Directive'),p('{'),list('InputValueDef'),p('}'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:298
InputValueDef
Input
ValueDef: ( string | Rule ) [] = [name('attribute'),p(':'),'Type',opt('DefaultValue'),list('Directive'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:271
InterfaceDef
Interface
Def: ( Rule | { style: string ; match: any } ) [] = [word('interface'),name('atom'),opt('Implements'),list('Directive'),p('{'),list('FieldDef'),p('}'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:230
ListType
List
Type: ( string | Rule ) [] = [p('['), 'Type', p(']'), opt(p('!'))]
Defined in packages/graphql-language-service/src/parser/Rules.ts:218
ListValue
List
Value: Rule [] = [p('['), list('Value'), p(']')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:211
Mutation
Mutation
: ( string | Rule | { style
: string ; match
: any } ) [] = [word('mutation'),opt(name('def')),opt('VariableDefinitions'),list('Directive'),'SelectionSet',]
Defined in packages/graphql-language-service/src/parser/Rules.ts:97
NamedType
NamedType: { style: string ; match: any ; update: any } [] = [type('atom')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:220
NonNullType
Non
NullType: ( string | Rule ) [] = ['NamedType', opt(p('!'))]
Defined in packages/graphql-language-service/src/parser/Rules.ts:219
NullValue
NullValue: { style: string ; match: any } [] = [t('Name', 'keyword')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:209
NumberValue
NumberValue: { style: string ; match: any } [] = [t('Number', 'number')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:196
ObjectField
Object
Field: ( string | Rule ) [] = [name('attribute'), p(':'), 'Value']
Defined in packages/graphql-language-service/src/parser/Rules.ts:213
ObjectTypeDef
Object
TypeDef: ( Rule | { style: string ; match: any } ) [] = [word('type'),name('atom'),opt('Implements'),list('Directive'),p('{'),list('FieldDef'),p('}'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:252
ObjectValue
Object
Value: Rule [] = [p('{'), list('ObjectField'), p('}')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:212
OperationTypeDef
Operation
TypeDef: Rule [] = [name('keyword'), p(':'), name('atom')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:250
Query
Query
: ( string | Rule | { style
: string ; match
: any } ) [] = [word('query'),opt(name('def')),opt('VariableDefinitions'),list('Directive'),'SelectionSet',]
Defined in packages/graphql-language-service/src/parser/Rules.ts:89
ScalarDef
Scalar
Def: ( Rule | { style: string ; match: any } ) [] = [word('scalar'), name('atom'), list('Directive')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:251
SchemaDef
Schema
Def: ( Rule | { style: string ; match: any } ) [] = [word('schema'),list('Directive'),p('{'),list('OperationTypeDef'),p('}'),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:242
SelectionSet
Selection
Set: Rule [] = [p('{'), list('Selection'), p('}')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:117
ShortQuery
ShortQuery: string [] = ['SelectionSet']
Defined in packages/graphql-language-service/src/parser/Rules.ts:88
StringValue
StringValue: { style: string ; match: any ; update: any } [] = [{style: 'string',match: (token: Token) => token.kind === 'String',update(state: State, token: Token) {if (token.value.startsWith('"""')) {state.inBlockstring = !token.value.slice(3).endsWith('"""');}},},]
Defined in packages/graphql-language-service/src/parser/Rules.ts:197
Subscription
Subscription
: ( string | Rule | { style
: string ; match
: any } ) [] = [word('subscription'),opt(name('def')),opt('VariableDefinitions'),list('Directive'),'SelectionSet',]
Defined in packages/graphql-language-service/src/parser/Rules.ts:105
TypeCondition
TypeCondition: ( string | { style: string ; match: any } ) [] = [word('on'), 'NamedType']
Defined in packages/graphql-language-service/src/parser/Rules.ts:162
UnionDef
Union
Def: ( Rule | { style: string ; match: any } ) [] = [word('union'),name('atom'),list('Directive'),p('='),list('UnionMember', p('|')),]
Defined in packages/graphql-language-service/src/parser/Rules.ts:279
UnionMember
UnionMember: string [] = ['NamedType']
Defined in packages/graphql-language-service/src/parser/Rules.ts:287
Variable
Variable
: Rule [] = [p('$', 'variable'), name('variable')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:115
VariableDefinition
Variable
Definition: ( string | Rule ) [] = ['Variable', p(':'), 'Type', opt('DefaultValue')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:114
VariableDefinitions
Variable
Definitions: Rule [] = [p('('), list('VariableDefinition'), p(')')]
Defined in packages/graphql-language-service/src/parser/Rules.ts:113
Definition
Defined in packages/graphql-language-service/src/parser/Rules.ts:55
Parameters
Selection
Selection( token: Token , stream: CharacterStream ) : "Field" | "AliasedField" | "InlineFragment" | "FragmentSpread"
Defined in packages/graphql-language-service/src/parser/Rules.ts:118
Parameters
Returns "Field" | "AliasedField" | "InlineFragment" | "FragmentSpread"
Type
Type( token: Token ) : "ListType" | "NonNullType"
Defined in packages/graphql-language-service/src/parser/Rules.ts:214
Parameters
Returns "ListType" | "NonNullType"
Value
Value( token: Token ) : "EnumValue" | "ObjectValue" | "ListValue" | "Variable" | "NamedType" | "NumberValue" | "StringValue" | "BooleanValue" | "NullValue"
Defined in packages/graphql-language-service/src/parser/Rules.ts:164
Parameters
Returns "EnumValue" | "ObjectValue" | "ListValue" | "Variable" | "NamedType" | "NumberValue" | "StringValue" | "BooleanValue" | "NullValue"
graphql-language-service
Changelog | API Docs | Discord
Purpose
This package brings together all the dependencies for building out web or desktop IDE services for the GraphQL Language.
It is named as such to match the convention of other vscode language services.
Interface
Language Service Protocol (LSP) methods written in TypeScript used by
graphql-language-service-server
,monaco-graphql
andcodemirror-graphql
.The goal is to provide methods for creating Language Server Protocol compliant services to be used by an IDE plugin, a browser application or desktop application.
Parser
A standalone online, immutable, dependency-free parser for GraphQL, used by the LSP interface methods
Utils
Various utilities