/** * graphql.ts, the knowledge GraphQL service. * * `graphql` is an optionalDependency and is reached only through * `graphqlModule()` / `primeGraphqlModule()` in ./graphql-schema.js. The two * class-static initialisers here, `buildSchema(KNOWLEDGE_GRAPHQL_SDL)` and * `printSchema(...)`, ran at MODULE INIT, which made an install without the * package a daemon that could not start rather than a GraphQL surface that * reports itself unavailable. They are lazily-computed accessors now, built on * first use and then cached, so the schema is still parsed and printed exactly * once per process. See ./graphql-schema.js and utils/optional-dependency.ts. */ import type { KnowledgeService } from './service.js'; export interface KnowledgeGraphqlAccessProfile { readonly operation: 'query' | 'mutation'; readonly requiredScopes: readonly string[]; readonly adminRequired: boolean; } export declare function inspectKnowledgeGraphqlAccess(source: string, operationName?: string): KnowledgeGraphqlAccessProfile; export interface KnowledgeGraphqlExecuteInput { readonly query: string; readonly operationName?: string | undefined; readonly variables?: Record | undefined; readonly admin: boolean; readonly scopes: readonly string[]; } export declare class KnowledgeGraphqlService { private readonly service; private static cachedSchema; private static cachedSchemaSdl; /** * The parsed schema, built on first use. This was a class-static * initialiser, which ran `buildSchema` at module init and so required * `graphql`, an optionalDependency, for the module to load at all. */ private static get schema(); /** The printed schema text, computed on first use for the same reason. */ static get schemaSdl(): string; constructor(service: KnowledgeService); get schemaText(): string; execute(input: KnowledgeGraphqlExecuteInput): Promise, import("graphql/jsutils/ObjMap.js").ObjMap>>; private createRootValue; } export declare function getKnowledgeGraphqlSchemaText(): string; //# sourceMappingURL=graphql.d.ts.map