Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LanguageService

Currently only used by the monaco-graphql worker

Hierarchy

  • LanguageService

Index

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
      • schemas: undefined | SchemaConfig[]

    Returns LanguageService

Methods

addSchema

getCompletion

  • getCompletion(uri: string, documentText: string, position: IPosition): CompletionItem[]

getDiagnostics

  • getDiagnostics(uri: string, documentText: string, customRules?: ValidationRule[]): Diagnostic[]

getExternalFragmentDefinitions

  • getExternalFragmentDefinitions(): FragmentDefinitionNode[]

getHover

  • getHover(uri: string, documentText: string, position: IPosition, options?: HoverConfig): undefined | string | MarkupContent | { language: string; value: string } | MarkedString[]

getSchemaForFile

  • getSchemaForFile(uri: string): SchemaCacheItem | undefined

getVariablesJSONSchema

  • getVariablesJSONSchema(uri: string, documentText: string, options?: JSONSchemaOptions): null | JSONSchema6

parse

  • parse(text: string | Source, options?: ParseOptions): DocumentNode

updateSchema

updateSchemas

Generated using TypeDoc