Skip to main content
Module

x/graphql_tools/deps.ts>execute

[DEPRECATED] 🦕 Useful tools to create and manipulate GraphQL schemas. Deno port of `graphql-tools` library
Latest
function execute
import { execute } from "https://deno.land/x/graphql_tools@0.0.4-deprecated/deps.ts";

Implements the "Evaluating requests" section of the GraphQL specification.

Returns either a synchronous ExecutionResult (if all encountered resolvers are synchronous), or a Promise of an ExecutionResult that will eventually be resolved and never rejected.

If the arguments to this function do not result in a legal execution context, a GraphQLError will be thrown immediately explaining the invalid input.

Accepts either an object with named arguments, or individual arguments.

Returns

PromiseOrValue<ExecutionResult>

Parameters

document: DocumentNode
optional
rootValue: any
optional
contextValue: any
optional
variableValues: Maybe<{ [key: string]: any; }>
optional
operationName: Maybe<string>
optional
fieldResolver: Maybe<GraphQLFieldResolver<any, any>>
optional
typeResolver: Maybe<GraphQLTypeResolver<any, any>>

Returns

PromiseOrValue<ExecutionResult>