UNPKG

@nestjs/graphql

Version:

GraphQL for NestJS: code-first and schema-first APIs, resolvers as providers, subscriptions, federation and generated SDL, on Apollo or Mercurius.

16 lines • 914 B
import { GraphQLSchema } from 'graphql'; /** * graphql-js hands the default value of an argument or input field to the * resolver as it is, while a value sent by the client is coerced against its * type: the input fields it leaves out take their own default values, and a * single item given for a list becomes a list. A declared default such as * `filter: PostFilter = {}` would then reach the resolver without the field * defaults the same `{}` gets when a client sends it (or when the schema is * rebuilt from its SDL, as the federation drivers do). * * Completes the declared default values the same way, once the schema is * built (the input types a default refers to cannot be read while the fields * of the input types are still being generated). */ export declare function completeDefaultValues(schema: GraphQLSchema): GraphQLSchema; //# sourceMappingURL=complete-default-values.helper.d.ts.map