graphql-language-service-utils
- Version 2.7.1
- Published
- 126 kB
- 3 dependencies
- MIT license
Install
npm i graphql-language-service-utils
yarn add graphql-language-service-utils
pnpm add graphql-language-service-utils
Overview
Utilities to support the GraphQL Language Service
Index
Variables
Functions
Classes
Type Aliases
Variables
variable getQueryFacts
const getQueryFacts: (schema?: any, documentString?: string) => OperationFacts;
Functions
function collectVariables
collectVariables: ( schema: GraphQLSchema, documentAST: DocumentNode) => VariableToType;
function getASTNodeAtPosition
getASTNodeAtPosition: ( query: string, ast: ASTNode, point: TPosition) => ASTNode | undefined;
function getFragmentDependencies
getFragmentDependencies: ( operationString: string, fragmentDefinitions?: Map<string, FragmentDefinitionNode> | null | undefined) => FragmentDefinitionNode[];
function getFragmentDependenciesForAST
getFragmentDependenciesForAST: ( parsedOperation: DocumentNode, fragmentDefinitions: Map<string, FragmentDefinitionNode>) => FragmentDefinitionNode[];
function getOperationASTFacts
getOperationASTFacts: ( documentAST: DocumentNode, schema?: GraphQLSchema | null) => OperationASTFacts;
function getOperationFacts
getOperationFacts: ( schema?: GraphQLSchema | null, documentString?: string | null) => OperationFacts | undefined;
function getVariablesJSONSchema
getVariablesJSONSchema: ( variableToType: VariableToType, options?: JSONSchemaOptions) => JSONSchema6;
function locToRange
locToRange: (text: string, loc: Location) => Range;
function offsetToPosition
offsetToPosition: (text: string, loc: number) => Position;
function pointToOffset
pointToOffset: (text: string, point: TPosition) => number;
function validateWithCustomRules
validateWithCustomRules: ( schema: GraphQLSchema, ast: DocumentNode, customRules?: Array<ValidationRule> | null, isRelayCompatMode?: boolean, isSchemaDocument?: boolean) => Array<GraphQLError>;
Classes
class Position
class Position implements IPosition {}
constructor
constructor(line: number, character: number);
property character
character: number;
property lessThanOrEqualTo
lessThanOrEqualTo: (position: IPosition) => boolean;
property line
line: number;
method setCharacter
setCharacter: (character: number) => void;
method setLine
setLine: (line: number) => void;
class Range
class Range implements IRange {}
constructor
constructor(start: IPosition, end: IPosition);
property containsPosition
containsPosition: (position: IPosition) => boolean;
property end
end: IPosition;
property start
start: IPosition;
method setEnd
setEnd: (line: number, character: number) => void;
method setStart
setStart: (line: number, character: number) => void;
Type Aliases
type JSONSchemaOptions
type JSONSchemaOptions = { useMarkdownDescription?: boolean;};
type OperationFacts
type OperationFacts = { documentAST: DocumentNode;} & OperationASTFacts;
type QueryFacts
type QueryFacts = OperationFacts;
type VariableToType
type VariableToType = { [variable: string]: GraphQLInputType;};
Package Files (8)
Dependencies (3)
Dev Dependencies (2)
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/graphql-language-service-utils
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/graphql-language-service-utils)
- HTML<a href="https://www.jsdocs.io/package/graphql-language-service-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2617 ms. - Missing or incorrect documentation? Open an issue for this package.