@types/graphql
Version:
TypeScript definitions for graphql
12 lines (10 loc) • 417 B
TypeScript
import { GraphQLSchema } from "../type/schema";
import { OperationDefinitionNode, OperationTypeDefinitionNode } from "../language/ast";
import { GraphQLObjectType } from "../type/definition";
/**
* Extracts the root type of the operation from the schema.
*/
export function getOperationRootType(
schema: GraphQLSchema,
operation: OperationDefinitionNode | OperationTypeDefinitionNode
): GraphQLObjectType;