@nestjs/graphql
Version:
GraphQL for NestJS: code-first and schema-first APIs, resolvers as providers, subscriptions, federation and generated SDL, on Apollo or Mercurius.
18 lines • 954 B
TypeScript
import { GraphQLSchema } from 'graphql';
/**
* Returns a copy of a default value, so that what one request does to it
* cannot change it for the next ones. Only plain arrays and plain objects
* (and the plain arrays and objects they hold) are copied: class instances
* (e.g., the internal value of a custom scalar) and primitives are returned
* as they are.
*/
export declare function cloneDefaultValue<T>(value: T): T;
/**
* graphql-js hands the default value of an argument or input field to every
* operation that omits it by reference, so a resolver that changes such an
* array or object in place (e.g., `input.tags.push(...)`) would change the
* default of all later requests. Makes every array or object default of the
* schema a getter that returns a copy of it (see `cloneDefaultValue()`).
*/
export declare function isolateDefaultValues(schema: GraphQLSchema): GraphQLSchema;
//# sourceMappingURL=clone-default-value.helper.d.ts.map