UNPKG

graphql-language-service-server

Version:
46 lines 1.62 kB
import type { GraphQLExtensionDeclaration, loadConfig, GraphQLProjectConfig } from 'graphql-config'; export type LoadConfigOptions = Parameters<typeof loadConfig>[0]; import { GraphQLConfig } from 'graphql-config'; import { ASTNode, GraphQLType } from 'graphql'; import { parseDocument } from './parseDocument'; import { SupportedExtensionsEnum } from './constants'; type RangeType = { start: { line: number; character: number; }; end: { line: number; character: number; }; }; type AdditionalLocateInfo = { node?: ASTNode | null; type?: GraphQLType | null; project: GraphQLProjectConfig; }; type LineNumber = string; type CharacterNumber = string; type RelayLSPLocateCommand = (projectName: string, typeName: string, info: AdditionalLocateInfo) => `${string}:${LineNumber}:${CharacterNumber}` | `${string}:${LineNumber}` | string; type GraphQLLocateCommand = (projectName: string, typeName: string, info: AdditionalLocateInfo) => { range: RangeType; uri: string; }; export type LocateCommand = RelayLSPLocateCommand | GraphQLLocateCommand; export interface ServerOptions { method?: 'socket' | 'stream' | 'node'; port?: number; hostname?: string; encoding?: 'utf-8' | 'ascii'; loadConfigOptions?: LoadConfigOptions; configDir?: string; extensions?: GraphQLExtensionDeclaration[]; fileExtensions?: ReadonlyArray<SupportedExtensionsEnum>; graphqlFileExtensions?: string[]; config?: GraphQLConfig; parser?: typeof parseDocument; tmpDir?: string; debug?: true; } export {}; //# sourceMappingURL=types.d.ts.map