Constructors
constructor
- new LanguageService(__namedParameters: { completionSettings: undefined | Omit<CompletionSettings, "uri">; customValidationRules: undefined | ValidationRule[]; externalFragmentDefinitions: undefined | string | FragmentDefinitionNode[]; fillLeafsOnComplete: undefined | false | true; parseOptions: undefined | ParseOptions; parser: undefined | parse; schemas: undefined | SchemaConfig[] }): LanguageService
-
Parameters
-
__namedParameters: { completionSettings: undefined | Omit<CompletionSettings, "uri">; customValidationRules: undefined | ValidationRule[]; externalFragmentDefinitions: undefined | string | FragmentDefinitionNode[]; fillLeafsOnComplete: undefined | false | true; parseOptions: undefined | ParseOptions; parser: undefined | parse; schemas: undefined | SchemaConfig[] }
-
completionSettings: undefined | Omit<CompletionSettings, "uri">
-
customValidationRules: undefined | ValidationRule[]
-
externalFragmentDefinitions: undefined | string | FragmentDefinitionNode[]
-
fillLeafsOnComplete: undefined | false | true
-
parseOptions: undefined | ParseOptions
-
parser: undefined | parse
-
Methods
getCompletion
- getCompletion(uri: string, documentText: string, position: IPosition): CompletionItem[]
-
Parameters
-
uri: string
-
documentText: string
-
position: IPosition
getDiagnostics
- getDiagnostics(uri: string, documentText: string, customRules?: ValidationRule[]): Diagnostic[]
-
Parameters
-
uri: string
-
documentText: string
-
Optional customRules: ValidationRule[]
Returns Diagnostic[]
getExternalFragmentDefinitions
- getExternalFragmentDefinitions(): FragmentDefinitionNode[]
-
Returns FragmentDefinitionNode[]
getHover
- getHover(uri: string, documentText: string, position: IPosition, options?: HoverConfig): undefined | string | MarkupContent | { language: string; value: string } | MarkedString[]
-
Parameters
-
uri: string
-
documentText: string
-
position: IPosition
-
Returns undefined | string | MarkupContent | { language: string; value: string } | MarkedString[]
getSchemaForFile
- getSchemaForFile(uri: string): SchemaCacheItem | undefined
-
Parameters
Returns SchemaCacheItem | undefined
getVariablesJSONSchema
- getVariablesJSONSchema(uri: string, documentText: string, options?: JSONSchemaOptions): null | JSONSchema6
-
Parameters
-
uri: string
-
documentText: string
-
Returns null | JSONSchema6
parse
- parse(text: string | Source, options?: ParseOptions): DocumentNode
-
Parameters
-
text: string | Source
-
Optional options: ParseOptions
Returns DocumentNode
updateSchemas
-
Parameters
Returns Promise<void>
Currently only used by the
monaco-graphql
worker