Module

x/graphql_deno/lib/execution/execute.js

GraphQL-JS ported to Deno
Latest
import * as mod from "https://dotland.deno.dev/x/graphql_deno@v15.0.0/lib/execution/execute.js";

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 value.

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.

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

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.