graphql-language-service-types

  • Version 1.8.2
  • Published
  • 32.6 kB
  • No dependencies
  • MIT license

Install

npm i graphql-language-service-types
yarn add graphql-language-service-types
pnpm add graphql-language-service-types

Overview

Types for building GraphQL language services for IDEs

Index

Variables

variable FileChangeTypeKind

const FileChangeTypeKind: { Created: number; Changed: number; Deleted: number };

    Interfaces

    interface FileEvent

    interface FileEvent {}

      property type

      type: FileChangeType;

        property uri

        uri: string;

          interface GraphQLCache

          interface GraphQLCache {}

            property getFragmentDefinitions

            getFragmentDefinitions: (
            graphQLConfig: GraphQLProjectConfig
            ) => Promise<Map<string, FragmentInfo>>;

              property getFragmentDependencies

              getFragmentDependencies: (
              query: string,
              fragmentDefinitions: Maybe<Map<string, FragmentInfo>>
              ) => Promise<FragmentInfo[]>;

                property getFragmentDependenciesForAST

                getFragmentDependenciesForAST: (
                parsedQuery: ASTNode,
                fragmentDefinitions: Map<string, FragmentInfo>
                ) => Promise<FragmentInfo[]>;

                  property getGraphQLConfig

                  getGraphQLConfig: () => GraphQLConfig;

                    property getObjectTypeDefinitions

                    getObjectTypeDefinitions: (
                    graphQLConfig: GraphQLProjectConfig
                    ) => Promise<Map<string, ObjectTypeInfo>>;

                      property getObjectTypeDependencies

                      getObjectTypeDependencies: (
                      query: string,
                      fragmentDefinitions: Map<string, ObjectTypeInfo>
                      ) => Promise<ObjectTypeInfo[]>;

                        property getObjectTypeDependenciesForAST

                        getObjectTypeDependenciesForAST: (
                        parsedQuery: ASTNode,
                        fragmentDefinitions: Map<string, ObjectTypeInfo>
                        ) => Promise<ObjectTypeInfo[]>;

                          property getProjectForFile

                          getProjectForFile: (uri: string) => GraphQLProjectConfig;

                            property getSchema

                            getSchema: (
                            appName?: string,
                            queryHasExtensions?: boolean
                            ) => Promise<GraphQLSchema | null>;

                              property updateFragmentDefinition

                              updateFragmentDefinition: (
                              rootDir: Uri,
                              filePath: Uri,
                              contents: CachedContent[]
                              ) => Promise<void>;

                                property updateFragmentDefinitionCache

                                updateFragmentDefinitionCache: (
                                rootDir: Uri,
                                filePath: Uri,
                                exists: boolean
                                ) => Promise<void>;

                                  property updateObjectTypeDefinition

                                  updateObjectTypeDefinition: (
                                  rootDir: Uri,
                                  filePath: Uri,
                                  contents: CachedContent[]
                                  ) => Promise<void>;

                                    property updateObjectTypeDefinitionCache

                                    updateObjectTypeDefinitionCache: (
                                    rootDir: Uri,
                                    filePath: Uri,
                                    exists: boolean
                                    ) => Promise<void>;

                                      interface IPosition

                                      interface IPosition {}

                                        property character

                                        character: number;

                                          property line

                                          line: number;

                                            method lessThanOrEqualTo

                                            lessThanOrEqualTo: (position: IPosition) => boolean;

                                              method setCharacter

                                              setCharacter: (character: number) => void;

                                                method setLine

                                                setLine: (line: number) => void;

                                                  interface IRange

                                                  interface IRange {}

                                                    property end

                                                    end: IPosition;

                                                      property start

                                                      start: IPosition;

                                                        method containsPosition

                                                        containsPosition: (position: IPosition) => boolean;

                                                          method setEnd

                                                          setEnd: (line: number, character: number) => void;

                                                            method setStart

                                                            setStart: (line: number, character: number) => void;

                                                              Type Aliases

                                                              type AllTypeInfo

                                                              type AllTypeInfo = {
                                                              type: Maybe<GraphQLType>;
                                                              parentType: Maybe<GraphQLType>;
                                                              inputType: Maybe<GraphQLType>;
                                                              directiveDef: Maybe<GraphQLDirective>;
                                                              fieldDef: Maybe<GraphQLField<any, any>>;
                                                              enumValue: Maybe<GraphQLEnumValue>;
                                                              argDef: Maybe<GraphQLArgument>;
                                                              argDefs: Maybe<GraphQLArgument[]>;
                                                              objectFieldDefs: Maybe<GraphQLInputFieldMap>;
                                                              interfaceDef: Maybe<GraphQLInterfaceType>;
                                                              objectTypeDef: Maybe<GraphQLObjectType>;
                                                              };

                                                                type CachedContent

                                                                type CachedContent = {
                                                                query: string;
                                                                range: IRange | null;
                                                                };

                                                                  type CompletionItem

                                                                  type CompletionItem = CompletionItemType & {
                                                                  isDeprecated?: boolean;
                                                                  documentation?: string | null;
                                                                  deprecationReason?: string | null;
                                                                  type?: GraphQLType;
                                                                  };

                                                                    type CompletionItemBase

                                                                    type CompletionItemBase = {
                                                                    label: string;
                                                                    isDeprecated?: boolean;
                                                                    };

                                                                      type Definition

                                                                      type Definition = {
                                                                      path: Uri;
                                                                      position: IPosition;
                                                                      range?: IRange;
                                                                      id?: string;
                                                                      name?: string;
                                                                      language?: string;
                                                                      projectRoot?: Uri;
                                                                      };

                                                                        type Diagnostic

                                                                        type Diagnostic = DiagnosticType;

                                                                          type FileChangeType

                                                                          type FileChangeType = FileChangeTypeKind[FileChangeTypeKeys];

                                                                            type FileChangeTypeKeys

                                                                            type FileChangeTypeKeys = keyof FileChangeTypeKind;

                                                                              type FileChangeTypeKind

                                                                              type FileChangeTypeKind = {
                                                                              Created: 1;
                                                                              Changed: 2;
                                                                              Deleted: 3;
                                                                              };

                                                                                type FragmentInfo

                                                                                type FragmentInfo = {
                                                                                filePath?: Uri;
                                                                                content: string;
                                                                                definition: FragmentDefinitionNode;
                                                                                };

                                                                                  type GraphQLFileInfo

                                                                                  type GraphQLFileInfo = {
                                                                                  filePath: Uri;
                                                                                  content: string;
                                                                                  asts: DocumentNode[];
                                                                                  queries: CachedContent[];
                                                                                  size: number;
                                                                                  mtime: number;
                                                                                  };

                                                                                    type GraphQLFileMetadata

                                                                                    type GraphQLFileMetadata = {
                                                                                    filePath: Uri;
                                                                                    size: number;
                                                                                    mtime: number;
                                                                                    };

                                                                                      type Maybe

                                                                                      type Maybe<T> = T | null | undefined;

                                                                                        type NamedTypeInfo

                                                                                        type NamedTypeInfo = {
                                                                                        filePath?: Uri;
                                                                                        content: string;
                                                                                        definition: NamedTypeNode;
                                                                                        };

                                                                                          type ObjectTypeInfo

                                                                                          type ObjectTypeInfo = {
                                                                                          filePath?: Uri;
                                                                                          content: string;
                                                                                          definition: TypeDefinitionNode;
                                                                                          };

                                                                                            type Outline

                                                                                            type Outline = {
                                                                                            outlineTrees: OutlineTree[];
                                                                                            };

                                                                                              type OutlineTree

                                                                                              type OutlineTree = {
                                                                                              plainText?: string;
                                                                                              tokenizedText?: TokenizedText;
                                                                                              representativeName?: string;
                                                                                              kind: string;
                                                                                              startPosition: IPosition;
                                                                                              endPosition?: IPosition;
                                                                                              children: OutlineTree[];
                                                                                              };

                                                                                                type TextToken

                                                                                                type TextToken = {
                                                                                                kind: TokenKind;
                                                                                                value: string | NameNode;
                                                                                                };

                                                                                                  type TokenizedText

                                                                                                  type TokenizedText = TextToken[];

                                                                                                    type TokenKind

                                                                                                    type TokenKind =
                                                                                                    | 'keyword'
                                                                                                    | 'class-name'
                                                                                                    | 'constructor'
                                                                                                    | 'method'
                                                                                                    | 'param'
                                                                                                    | 'string'
                                                                                                    | 'whitespace'
                                                                                                    | 'plain'
                                                                                                    | 'type';

                                                                                                      type Uri

                                                                                                      type Uri = string;

                                                                                                        Package Files (1)

                                                                                                        Dependencies (0)

                                                                                                        No dependencies.

                                                                                                        Dev Dependencies (3)

                                                                                                        Peer Dependencies (1)

                                                                                                        Badge

                                                                                                        To add a badge like this onejsDocs.io badgeto 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-types.

                                                                                                        • Markdown
                                                                                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/graphql-language-service-types)
                                                                                                        • HTML
                                                                                                          <a href="https://www.jsdocs.io/package/graphql-language-service-types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>