mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-27 14:30:49 +08:00
21 lines
721 B
TypeScript
21 lines
721 B
TypeScript
import { DocumentNode } from '../language/ast';
|
|
import { GraphQLSchema } from '../type/schema';
|
|
|
|
|
|
/**
|
|
* Produces a new schema given an existing schema and a document which may
|
|
* contain GraphQL type extensions and definitions. The original schema will
|
|
* remain unaltered.
|
|
*
|
|
* Because a schema represents a graph of references, a schema cannot be
|
|
* extended without effectively making an entire copy. We do not know until it's
|
|
* too late if subgraphs remain unchanged.
|
|
*
|
|
* This algorithm copies the provided schema, applying extensions while
|
|
* producing the copy. The original schema remains unaltered.
|
|
*/
|
|
export function extendSchema(
|
|
schema: GraphQLSchema,
|
|
documentAST: DocumentNode
|
|
): GraphQLSchema;
|