EXPERIMENTAL: Automatically fill required leaf nodes recursively upon triggering code completion events.
{
as a completion option
that appears when all required arguments are supplied, the argument
selection closes )
and the leaf field expands again { \n| }
Scalar schema mappings.
whether to append a non-json schema valid 'markdownDescriptionfor
monaco-json`
use undocumented monaco-json
markdownDescription
field in place of json-schema spec description
field.
for backwards compatibility
Generates a map of GraphQLInputTypes for all the variables in an AST document of operations
Given GraphQLSchema, queryText, and context of the current position within the source text, provide a list of typeahead entries.
Returns the token, state, typeInfo and mode at the cursor position Used by getAutocompleteSuggestions
generates a TextSnippet for a field with possible required arguments that dynamically adjusts to the number of required arguments
extract all operation nodes, and if schema is present, variable definitions, in a map
a graphql-js compatible AST node
optional schema
Provided previous "queryFacts", a GraphQL schema, and a query document string, return a set of facts about that query useful for GraphiQL features.
If the query cannot be parsed, returns undefined.
(optional)
the document you want to parse for operations (optional)
Given a query text and a cursor position, return the context token
Generates a JSONSchema6 valid document for operation(s) from a map of Map<string, GraphQLInputType>.
It generates referenced Definitions for each type, so that no graphql types are repeated.
Note: you must install @types/json-schema
if you want a valid result type
'
Whitespace tokens defined in GraphQL spec.
Provides an utility function to parse a given query text and construct a
token
context object.
A token context provides useful information about the token/style that
CharacterStream currently possesses, as well as the end state and style
of the token.
Validate a GraphQL Document optionally with custom validation rules.
The lexer rules. These are exactly as described by the spec.
The parser rules. These are very close to, but not exactly the same as the spec. Minor deviations allow for a simpler implementation. The resulting parser can parse everything the spec declares possible.
Generated using TypeDoc
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