Skip to main content
Module

x/graphql_deno/lib/execution/execute.d.ts

GraphQL-JS ported to Deno
Latest
import * as graphqlDeno from "https://deno.land/x/graphql_deno@v15.0.0/lib/execution/execute.d.ts";

Variables

If a resolve function is not given, then a default resolve behavior is used which takes the property of the source object of the same name as the field and returns it as the result, or if it's a function, returns the result of calling that function while passing along args and context.

If a resolveType function is not given, then a default resolve behavior is used which attempts two strategies:

Functions

Essential assertions before executing to provide developer feedback for improper use of the GraphQL library.

Constructs a ExecutionContext object from the arguments passed to execute, which we will pass throughout the other execution methods.

Given a selectionSet, adds all of the fields in that selection to the passed in map of fields, and returns it at the end.

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

This method looks up the field on the given type definition. It has special casing for the two introspection fields, __schema and __typename. __typename is special because it can always be queried as a field, even in situations where no other fields are allowed, like on a Union. __schema could get automatically added to the query type, but that would require mutating type definitions, which would cause issues.

Isolates the "ReturnOrAbrupt" behavior to not de-opt the resolveField function. Returns the result of resolveFn or the abrupt-return Error object.

Interfaces

Data that must be available at all points during query execution.

The result of GraphQL execution.