Latest
function collectFields
import { collectFields } from "https://dotland.deno.dev/x/graphql_deno@v15.0.0/lib/execution/execute.d.ts";

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

CollectFields requires the "runtime type" of an object. For a field which returns an Interface or Union type, the "runtime type" will be the actual Object type returned by that field.

Parameters

exeContext: ExecutionContext
runtimeType: GraphQLObjectType
selectionSet: SelectionSetNode
fields: { [key: string]: Array<FieldNode>; }
visitedFragmentNames: { [key: string]: boolean; }

Returns

{ [key: string]: Array<FieldNode>; }