graphql-language-service-server
Version:
Server process backing the GraphQL Language Service
44 lines • 1.6 kB
TypeScript
import type { GraphQLExtensionDeclaration, loadConfig, GraphQLProjectConfig } from 'graphql-config';
export declare type LoadConfigOptions = Parameters<typeof loadConfig>[0];
import { GraphQLConfig } from 'graphql-config';
import { ASTNode, GraphQLType } from 'graphql';
import { parseDocument } from './parseDocument';
import { SupportedExtensionsEnum } from './constants';
declare type RangeType = {
start: {
line: number;
character: number;
};
end: {
line: number;
character: number;
};
};
declare type AdditionalLocateInfo = {
node?: ASTNode | null;
type?: GraphQLType | null;
project: GraphQLProjectConfig;
};
declare type RelayLSPLocateCommand = (projectName: string, typeName: string, info: AdditionalLocateInfo) => `${string}:${string}:${string}` | `${string}:${string}` | string;
declare type GraphQLLocateCommand = (projectName: string, typeName: string, info: AdditionalLocateInfo) => {
range: RangeType;
uri: string;
};
export declare 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