Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
function getFieldDef
import { getFieldDef } from "https://deno.land/x/graphql_deno@v15.0.0/lib/execution/execute.d.ts";

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.

Parameters

parentType: GraphQLObjectType
fieldName: string