graphql
Version:
A Query Language and Runtime which can target any service.
1 lines • 200 kB
Source Map (JSON)
{"version":3,"file":"definition.mjs","sourceRoot":"","sources":["../../src/type/definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,iCAAgC;AACpD,OAAO,EAAE,UAAU,EAAE,kCAAiC;AACtD,OAAO,EAAE,YAAY,EAAE,oCAAmC;AAC1D,OAAO,EAAE,OAAO,EAAE,+BAA8B;AAChD,OAAO,EAAE,UAAU,EAAE,kCAAiC;AACtD,OAAO,EAAE,MAAM,EAAE,8BAA6B;AAC9C,OAAO,EAAE,SAAS,EAAE,iCAAgC;AACpD,OAAO,EAAE,QAAQ,EAAE,gCAA+B;AAKlD,OAAO,EAAE,cAAc,EAAE,sCAAqC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,gCAA+B;AAE7D,OAAO,EAAE,YAAY,EAAE,kCAAiC;AAwBxD,OAAO,EAAE,IAAI,EAAE,8BAA6B;AAC5C,OAAO,EAAE,aAAa,IAAI,KAAK,EAAE,gCAA+B;AAKhE,OAAO,EAAE,mBAAmB,EAAE,6CAA4C;AAE1E,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,yBAAwB;AA8BlE,MAAM,UAAU,MAAM,CAAC,IAAa;IAClC,OAAO,CACL,YAAY,CAAC,IAAI,CAAC;QAClB,YAAY,CAAC,IAAI,CAAC;QAClB,eAAe,CAAC,IAAI,CAAC;QACrB,WAAW,CAAC,IAAI,CAAC;QACjB,UAAU,CAAC,IAAI,CAAC;QAChB,iBAAiB,CAAC,IAAI,CAAC;QACvB,UAAU,CAAC,IAAI,CAAC;QAChB,aAAa,CAAC,IAAI,CAAC,CACpB,CAAC;AACJ,CAAC;AAuBD,MAAM,UAAU,UAAU,CAAC,IAAa;IACtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;I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from '../jsutils/devAssert.ts';\nimport { didYouMean } from '../jsutils/didYouMean.ts';\nimport { identityFunc } from '../jsutils/identityFunc.ts';\nimport { inspect } from '../jsutils/inspect.ts';\nimport { instanceOf } from '../jsutils/instanceOf.ts';\nimport { keyMap } from '../jsutils/keyMap.ts';\nimport { keyValMap } from '../jsutils/keyValMap.ts';\nimport { mapValue } from '../jsutils/mapValue.ts';\nimport type { Maybe } from '../jsutils/Maybe.ts';\nimport type { ObjMap } from '../jsutils/ObjMap.ts';\nimport type { Path } from '../jsutils/Path.ts';\nimport type { PromiseOrValue } from '../jsutils/PromiseOrValue.ts';\nimport { suggestionList } from '../jsutils/suggestionList.ts';\nimport { toObjMapWithSymbols } from '../jsutils/toObjMap.ts';\n\nimport { GraphQLError } from '../error/GraphQLError.ts';\n\nimport type {\n ConstValueNode,\n EnumTypeDefinitionNode,\n EnumTypeExtensionNode,\n EnumValueDefinitionNode,\n FieldDefinitionNode,\n FieldNode,\n FragmentDefinitionNode,\n InputObjectTypeDefinitionNode,\n InputObjectTypeExtensionNode,\n InputValueDefinitionNode,\n InterfaceTypeDefinitionNode,\n InterfaceTypeExtensionNode,\n ObjectTypeDefinitionNode,\n ObjectTypeExtensionNode,\n OperationDefinitionNode,\n ScalarTypeDefinitionNode,\n ScalarTypeExtensionNode,\n UnionTypeDefinitionNode,\n UnionTypeExtensionNode,\n ValueNode,\n} from '../language/ast.ts';\nimport { Kind } from '../language/kinds.ts';\nimport { printForError as print } from '../language/printer.ts';\n\nimport type { GraphQLVariableSignature } from '../execution/getVariableSignature.ts';\nimport type { VariableValues } from '../execution/values.ts';\n\nimport { valueFromASTUntyped } from '../utilities/valueFromASTUntyped.ts';\n\nimport { assertEnumValueName, assertName } from './assertName.ts';\nimport type { GraphQLDirective } from './directives.ts';\nimport type { GraphQLSchema } from './schema.ts';\n\n// Predicates & Assertions\n\n/** These are all of the possible kinds of types. */\nexport type GraphQLType = GraphQLNamedType | GraphQLWrappingType;\n\n/**\n * Returns true when the value is any GraphQL type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is any GraphQL type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { GraphQLList, GraphQLString, isType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Query {\n * name: String\n * }\n * `);\n *\n * isType(GraphQLString); // => true\n * isType(new GraphQLList(GraphQLString)); // => true\n * isType(schema.getType('Query')); // => true\n * isType('String'); // => false\n * ```\n */\nexport function isType(type: unknown): type is GraphQLType {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n isInputObjectType(type) ||\n isListType(type) ||\n isNonNullType(type)\n );\n}\n\n/**\n * Returns the value as a GraphQL type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Query {\n * name: String\n * }\n * `);\n *\n * const queryType = assertType(schema.getType('Query'));\n *\n * queryType.toString(); // => 'Query'\n * assertType('Query'); // throws an error\n * ```\n */\nexport function assertType(type: unknown): GraphQLType {\n if (!isType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL type.`);\n }\n return type;\n}\n\n/** @private */\nconst scalarSymbol: unique symbol = Symbol('Scalar');\n\n/**\n * There are predicates for each kind of GraphQL type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLScalarType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isScalarType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * scalar DateTime\n *\n * type Query {\n * createdAt: DateTime\n * }\n * `);\n *\n * isScalarType(schema.getType('DateTime')); // => true\n * isScalarType(schema.getType('Query')); // => false\n * ```\n */\nexport function isScalarType(type: unknown): type is GraphQLScalarType {\n return instanceOf(type, scalarSymbol, GraphQLScalarType);\n}\n\n/**\n * Returns the value as a GraphQLScalarType, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLScalarType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertScalarType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * scalar DateTime\n *\n * type Query {\n * createdAt: DateTime\n * }\n * `);\n *\n * const dateTimeType = assertScalarType(schema.getType('DateTime'));\n *\n * dateTimeType.name; // => 'DateTime'\n * assertScalarType(schema.getType('Query')); // throws an error\n * ```\n */\nexport function assertScalarType(type: unknown): GraphQLScalarType {\n if (!isScalarType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Scalar type.`);\n }\n return type;\n}\n\n/** @private */\nconst objectSymbol: unique symbol = Symbol('Object');\n\n/**\n * Returns true when the value is a GraphQLObjectType.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLObjectType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type User {\n * name: String\n * }\n *\n * type Query {\n * user: User\n * }\n * `);\n *\n * isObjectType(schema.getType('User')); // => true\n * isObjectType(schema.getType('ReviewInput')); // => false\n * ```\n */\nexport function isObjectType(type: unknown): type is GraphQLObjectType {\n return instanceOf(type, objectSymbol, GraphQLObjectType);\n}\n\n/**\n * Returns the value as a GraphQLObjectType, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLObjectType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type User {\n * name: String\n * }\n *\n * type Query {\n * user: User\n * }\n * `);\n *\n * const userType = assertObjectType(schema.getType('User'));\n *\n * Object.keys(userType.getFields()); // => ['name']\n * assertObjectType(schema.getType('ReviewInput')); // throws an error\n * ```\n */\nexport function assertObjectType(type: unknown): GraphQLObjectType {\n if (!isObjectType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Object type.`);\n }\n return type;\n}\n\n/** @private */\nconst fieldSymbol: unique symbol = Symbol('Field');\n\n/**\n * Returns true when the value is a resolved GraphQL field definition.\n * @param field - Value to inspect.\n * @returns True when the value is a GraphQLField.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isField } from 'graphql/type';\n *\n * const schema = buildSchema('type Query { greeting: String }');\n * const field = schema.getQueryType()?.getFields().greeting;\n *\n * isField(field); // => true\n * isField(schema.getQueryType()); // => false\n * ```\n */\nexport function isField(field: unknown): field is GraphQLField {\n return instanceOf(field, fieldSymbol, GraphQLField);\n}\n\n/**\n * Returns the value as a GraphQLField, or throws if it is not one.\n * @param field - Value to inspect.\n * @returns The value typed as a GraphQLField.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertField } from 'graphql/type';\n *\n * const schema = buildSchema('type Query { greeting: String }');\n * const field = assertField(schema.getQueryType()?.getFields().greeting);\n *\n * field.name; // => 'greeting'\n * assertField(schema.getQueryType()); // throws an error\n * ```\n */\nexport function assertField(field: unknown): GraphQLField {\n if (!isField(field)) {\n throw new Error(`Expected ${inspect(field)} to be a GraphQL field.`);\n }\n return field;\n}\n\n/** @private */\nconst argumentSymbol: unique symbol = Symbol('Argument');\n\n/**\n * Returns true when the value is a resolved GraphQL argument definition.\n * @param arg - Value to inspect.\n * @returns True when the value is a GraphQLArgument.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isArgument } from 'graphql/type';\n *\n * const schema = buildSchema('type Query { greeting(name: String): String }');\n * const arg = schema.getQueryType()?.getFields().greeting.args[0];\n *\n * isArgument(arg); // => true\n * isArgument(schema.getQueryType()); // => false\n * ```\n */\nexport function isArgument(arg: unknown): arg is GraphQLArgument {\n return instanceOf(arg, argumentSymbol, GraphQLArgument);\n}\n\n/**\n * Returns the value as a GraphQLArgument, or throws if it is not one.\n * @param arg - Value to inspect.\n * @returns The value typed as a GraphQLArgument.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertArgument } from 'graphql/type';\n *\n * const schema = buildSchema('type Query { greeting(name: String): String }');\n * const arg = assertArgument(schema.getQueryType()?.getFields().greeting.args[0]);\n *\n * arg.name; // => 'name'\n * assertArgument(schema.getQueryType()); // throws an error\n * ```\n */\nexport function assertArgument(arg: unknown): GraphQLArgument {\n if (!isArgument(arg)) {\n throw new Error(`Expected ${inspect(arg)} to be a GraphQL argument.`);\n }\n return arg;\n}\n\n/** @private */\nconst interfaceSymbol: unique symbol = Symbol('Interface');\n\n/**\n * Returns true when the value is a GraphQLInterfaceType.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLInterfaceType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isInterfaceType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * node: Node\n * }\n * `);\n *\n * isInterfaceType(schema.getType('Node')); // => true\n * isInterfaceType(schema.getType('User')); // => false\n * ```\n */\nexport function isInterfaceType(type: unknown): type is GraphQLInterfaceType {\n return instanceOf(type, interfaceSymbol, GraphQLInterfaceType);\n}\n\n/**\n * Returns the value as a GraphQLInterfaceType, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLInterfaceType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInterfaceType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * node: Node\n * }\n * `);\n *\n * const nodeType = assertInterfaceType(schema.getType('Node'));\n *\n * nodeType.name; // => 'Node'\n * assertInterfaceType(schema.getType('User')); // throws an error\n * ```\n */\nexport function assertInterfaceType(type: unknown): GraphQLInterfaceType {\n if (!isInterfaceType(type)) {\n throw new Error(\n `Expected ${inspect(type)} to be a GraphQL Interface type.`,\n );\n }\n return type;\n}\n\n/** @private */\nconst unionSymbol: unique symbol = Symbol('Union');\n\n/**\n * Returns true when the value is a GraphQLUnionType.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLUnionType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isUnionType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Photo {\n * url: String!\n * }\n *\n * type Video {\n * url: String!\n * }\n *\n * union Media = Photo | Video\n *\n * type Query {\n * media: [Media]\n * }\n * `);\n *\n * isUnionType(schema.getType('Media')); // => true\n * isUnionType(schema.getType('Photo')); // => false\n * ```\n */\nexport function isUnionType(type: unknown): type is GraphQLUnionType {\n return instanceOf(type, unionSymbol, GraphQLUnionType);\n}\n\n/**\n * Returns the value as a GraphQLUnionType, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLUnionType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertUnionType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Photo {\n * url: String!\n * }\n *\n * type Video {\n * url: String!\n * }\n *\n * union Media = Photo | Video\n *\n * type Query {\n * media: [Media]\n * }\n * `);\n *\n * const mediaType = assertUnionType(schema.getType('Media'));\n *\n * mediaType.getTypes().map((type) => type.name); // => ['Photo', 'Video']\n * assertUnionType(schema.getType('Photo')); // throws an error\n * ```\n */\nexport function assertUnionType(type: unknown): GraphQLUnionType {\n if (!isUnionType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Union type.`);\n }\n return type;\n}\n\n/** @private */\nconst enumSymbol: unique symbol = Symbol('Enum');\n\n/**\n * Returns true when the value is a GraphQLEnumType.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLEnumType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isEnumType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * EMPIRE\n * }\n *\n * type Query {\n * favoriteEpisode: Episode\n * }\n * `);\n *\n * isEnumType(schema.getType('Episode')); // => true\n * isEnumType(schema.getType('Query')); // => false\n * ```\n */\nexport function isEnumType(type: unknown): type is GraphQLEnumType {\n return instanceOf(type, enumSymbol, GraphQLEnumType);\n}\n\n/**\n * Returns the value as a GraphQLEnumType, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLEnumType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertEnumType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * EMPIRE\n * }\n *\n * type Query {\n * favoriteEpisode: Episode\n * }\n * `);\n *\n * const episodeType = assertEnumType(schema.getType('Episode'));\n *\n * episodeType.getValues().map((value) => value.name); // => ['NEW_HOPE', 'EMPIRE']\n * assertEnumType(schema.getType('Query')); // throws an error\n * ```\n */\nexport function assertEnumType(type: unknown): GraphQLEnumType {\n if (!isEnumType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Enum type.`);\n }\n return type;\n}\n\n/** @private */\nconst enumValueSymbol: unique symbol = Symbol('EnumValue');\n\n/**\n * Returns true when the value is a resolved GraphQL enum value definition.\n * @param value - Value to inspect.\n * @returns True when the value is a GraphQLEnumValue.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertEnumType, isEnumValue } from 'graphql/type';\n *\n * const schema = buildSchema(\n * 'enum Episode { NEW_HOPE } type Query { episode: Episode }',\n * );\n * const enumValue = assertEnumType(schema.getType('Episode')).getValues()[0];\n *\n * isEnumValue(enumValue); // => true\n * isEnumValue(schema.getType('Episode')); // => false\n * ```\n */\nexport function isEnumValue(value: unknown): value is GraphQLEnumValue {\n return instanceOf(value, enumValueSymbol, GraphQLEnumValue);\n}\n\n/**\n * Returns the value as a GraphQLEnumValue, or throws if it is not one.\n * @param value - Value to inspect.\n * @returns The value typed as a GraphQLEnumValue.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertEnumType, assertEnumValue } from 'graphql/type';\n *\n * const schema = buildSchema(\n * 'enum Episode { NEW_HOPE } type Query { episode: Episode }',\n * );\n * const enumValue = assertEnumValue(\n * assertEnumType(schema.getType('Episode')).getValues()[0],\n * );\n *\n * enumValue.name; // => 'NEW_HOPE'\n * assertEnumValue(schema.getType('Episode')); // throws an error\n * ```\n */\nexport function assertEnumValue(value: unknown): GraphQLEnumValue {\n if (!isEnumValue(value)) {\n throw new Error(`Expected ${inspect(value)} to be a GraphQL Enum value.`);\n }\n return value;\n}\n\n/** @private */\nconst inputObjectSymbol: unique symbol = Symbol('InputObject');\n\n/**\n * Returns true when the value is a GraphQLInputObjectType.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLInputObjectType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isInputObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: ReviewInput): Review\n * }\n * `);\n *\n * isInputObjectType(schema.getType('ReviewInput')); // => true\n * isInputObjectType(schema.getType('Review')); // => false\n * ```\n */\nexport function isInputObjectType(\n type: unknown,\n): type is GraphQLInputObjectType {\n return instanceOf(type, inputObjectSymbol, GraphQLInputObjectType);\n}\n\n/**\n * Returns the value as a GraphQLInputObjectType, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLInputObjectType.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInputObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: ReviewInput): Review\n * }\n * `);\n *\n * const inputType = assertInputObjectType(schema.getType('ReviewInput'));\n *\n * Object.keys(inputType.getFields()); // => ['stars']\n * assertInputObjectType(schema.getType('Review')); // throws an error\n * ```\n */\nexport function assertInputObjectType(type: unknown): GraphQLInputObjectType {\n if (!isInputObjectType(type)) {\n throw new Error(\n `Expected ${inspect(type)} to be a GraphQL Input Object type.`,\n );\n }\n return type;\n}\n\n/** @private */\nconst inputFieldSymbol: unique symbol = Symbol('InputField');\n\n/**\n * Returns true when the value is a resolved GraphQL input field definition.\n * @param field - Value to inspect.\n * @returns True when the value is a GraphQLInputField.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInputObjectType, isInputField } from 'graphql/type';\n *\n * const schema = buildSchema(\n * 'input ReviewInput { stars: Int } type Query { ok: Boolean }',\n * );\n * const inputField = assertInputObjectType(\n * schema.getType('ReviewInput'),\n * ).getFields().stars;\n *\n * isInputField(inputField); // => true\n * isInputField(schema.getQueryType()); // => false\n * ```\n */\nexport function isInputField(field: unknown): field is GraphQLInputField {\n return instanceOf(field, inputFieldSymbol, GraphQLInputField);\n}\n\n/**\n * Returns the value as a GraphQLInputField, or throws if it is not one.\n * @param field - Value to inspect.\n * @returns The value typed as a GraphQLInputField.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInputField, assertInputObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(\n * 'input ReviewInput { stars: Int } type Query { ok: Boolean }',\n * );\n * const inputField = assertInputField(\n * assertInputObjectType(schema.getType('ReviewInput')).getFields().stars,\n * );\n *\n * inputField.name; // => 'stars'\n * assertInputField(schema.getQueryType()); // throws an error\n * ```\n */\nexport function assertInputField(field: unknown): GraphQLInputField {\n if (!isInputField(field)) {\n throw new Error(`Expected ${inspect(field)} to be a GraphQL input field.`);\n }\n return field;\n}\n\n/** @private */\nconst listSymbol: unique symbol = Symbol('List');\n\n/**\n * Returns true when the value is a GraphQLList.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLList.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { GraphQLList, GraphQLString, isListType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Query {\n * tags: [String!]!\n * }\n * `);\n *\n * const tagsField = schema.getQueryType()?.getFields().tags;\n *\n * isListType(new GraphQLList(GraphQLString)); // => true\n * isListType(GraphQLString); // => false\n * isListType(tagsField?.type); // => false\n * ```\n */\nexport function isListType(\n type: GraphQLInputType,\n): type is GraphQLList<GraphQLInputType>;\n/**\n * Returns true when the output type is a GraphQLList.\n * @param type - The GraphQL output type to inspect.\n * @returns True when the output type is a list type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { getNullableType, isListType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Query {\n * tags: [String!]!\n * }\n * `);\n *\n * const tagsField = schema.getQueryType()?.getFields().tags;\n * const nullableTagsType = getNullableType(tagsField?.type);\n *\n * isListType(nullableTagsType); // => true\n * ```\n */\nexport function isListType(\n type: GraphQLOutputType,\n): type is GraphQLList<GraphQLOutputType>;\n/**\n * Returns true when the value is a GraphQLList.\n * @param type - The value to inspect.\n * @returns True when the value is a list type.\n * @example\n * ```ts\n * import { isListType } from 'graphql/type';\n *\n * isListType('[String]'); // => false\n * isListType(null); // => false\n * ```\n */\nexport function isListType(type: unknown): type is GraphQLList<GraphQLType>;\n/**\n * Returns true when the value is a GraphQLList.\n * @internal\n */\nexport function isListType(type: unknown): type is GraphQLList<GraphQLType> {\n return instanceOf(type, listSymbol, GraphQLList);\n}\n\n/**\n * Returns the value as a GraphQLList, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLList.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString, assertListType } from 'graphql/type';\n *\n * const listType = assertListType(new GraphQLList(GraphQLString));\n *\n * listType.ofType; // => GraphQLString\n * assertListType(GraphQLString); // throws an error\n * ```\n */\nexport function assertListType(type: unknown): GraphQLList<GraphQLType> {\n if (!isListType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL List type.`);\n }\n return type;\n}\n\n/** @private */\nconst nonNullSymbol: unique symbol = Symbol('NonNull');\n\n/**\n * Returns true when the value is a GraphQLNonNull.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQLNonNull.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { GraphQLNonNull, GraphQLString, isNonNullType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Query {\n * name: String!\n * nickname: String\n * }\n * `);\n *\n * const fields = schema.getQueryType()?.getFields();\n *\n * isNonNullType(new GraphQLNonNull(GraphQLString)); // => true\n * isNonNullType(fields?.name.type); // => true\n * isNonNullType(fields?.nickname.type); // => false\n * ```\n */\nexport function isNonNullType(\n type: GraphQLInputType,\n): type is GraphQLNonNull<GraphQLNullableInputType>;\n/**\n * Returns true when the output type is a GraphQLNonNull.\n * @param type - The GraphQL output type to inspect.\n * @returns True when the output type is a non-null type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isNonNullType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Query {\n * name: String!\n * nickname: String\n * }\n * `);\n *\n * const fields = schema.getQueryType()?.getFields();\n *\n * isNonNullType(fields?.name.type); // => true\n * isNonNullType(fields?.nickname.type); // => false\n * ```\n */\nexport function isNonNullType(\n type: GraphQLOutputType,\n): type is GraphQLNonNull<GraphQLNullableOutputType>;\n/**\n * Returns true when the value is a GraphQLNonNull.\n * @param type - The value to inspect.\n * @returns True when the value is a non-null type.\n * @example\n * ```ts\n * import { isNonNullType } from 'graphql/type';\n *\n * isNonNullType('String!'); // => false\n * isNonNullType(null); // => false\n * ```\n */\nexport function isNonNullType(\n type: unknown,\n): type is GraphQLNonNull<GraphQLNullableType>;\n/**\n * Returns true when the value is a GraphQLNonNull.\n * @internal\n */\nexport function isNonNullType(\n type: unknown,\n): type is GraphQLNonNull<GraphQLNullableType> {\n return instanceOf(type, nonNullSymbol, GraphQLNonNull);\n}\n\n/**\n * Returns the value as a GraphQLNonNull, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQLNonNull.\n * @example\n * ```ts\n * import { GraphQLNonNull, GraphQLString, assertNonNullType } from 'graphql/type';\n *\n * const nonNullType = assertNonNullType(new GraphQLNonNull(GraphQLString));\n *\n * nonNullType.ofType; // => GraphQLString\n * assertNonNullType(GraphQLString); // throws an error\n * ```\n */\nexport function assertNonNullType(\n type: unknown,\n): GraphQLNonNull<GraphQLNullableType> {\n if (!isNonNullType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL Non-Null type.`);\n }\n return type;\n}\n\n/** These types may be used as input types for arguments and directives. */\nexport type GraphQLNullableInputType =\n | GraphQLNamedInputType\n | GraphQLList<GraphQLInputType>;\n\n/** These types may be used as input types for arguments and directives. */\nexport type GraphQLInputType =\n | GraphQLNullableInputType\n | GraphQLNonNull<GraphQLNullableInputType>;\n\n/**\n * Returns true when the value can be used as a GraphQL input type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value can be used as a GraphQL input type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isInputType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: ReviewInput): Review\n * }\n * `);\n *\n * isInputType(schema.getType('ReviewInput')); // => true\n * isInputType(schema.getType('Review')); // => false\n * ```\n */\nexport function isInputType(type: unknown): type is GraphQLInputType {\n return (\n isScalarType(type) ||\n isEnumType(type) ||\n isInputObjectType(type) ||\n (isWrappingType(type) && isInputType(type.ofType))\n );\n}\n\n/**\n * Returns the value as a GraphQL input type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL input type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInputType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: ReviewInput): Review\n * }\n * `);\n *\n * const inputType = assertInputType(schema.getType('ReviewInput'));\n *\n * inputType.toString(); // => 'ReviewInput'\n * assertInputType(schema.getType('Review')); // throws an error\n * ```\n */\nexport function assertInputType(type: unknown): GraphQLInputType {\n if (!isInputType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL input type.`);\n }\n return type;\n}\n\n/** These types may be used as output types as the result of fields. */\nexport type GraphQLNullableOutputType =\n | GraphQLNamedOutputType\n | GraphQLList<GraphQLOutputType>;\n\n/** These types may be used as output types as the result of fields. */\nexport type GraphQLOutputType =\n | GraphQLNullableOutputType\n | GraphQLNonNull<GraphQLNullableOutputType>;\n\n/**\n * Returns true when the value can be used as a GraphQL output type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value can be used as a GraphQL output type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isOutputType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: ReviewInput): Review\n * }\n * `);\n *\n * isOutputType(schema.getType('Review')); // => true\n * isOutputType(schema.getType('ReviewInput')); // => false\n * ```\n */\nexport function isOutputType(type: unknown): type is GraphQLOutputType {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n (isWrappingType(type) && isOutputType(type.ofType))\n );\n}\n\n/**\n * Returns the value as a GraphQL output type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL output type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertOutputType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: ReviewInput): Review\n * }\n * `);\n *\n * const outputType = assertOutputType(schema.getType('Review'));\n *\n * outputType.toString(); // => 'Review'\n * assertOutputType(schema.getType('ReviewInput')); // throws an error\n * ```\n */\nexport function assertOutputType(type: unknown): GraphQLOutputType {\n if (!isOutputType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL output type.`);\n }\n return type;\n}\n\n/** These types may describe types which may be leaf values. */\nexport type GraphQLLeafType = GraphQLScalarType | GraphQLEnumType;\n\n/**\n * Returns true when the value is a GraphQL scalar or enum type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQL scalar or enum type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isLeafType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * episode: Episode\n * review: Review\n * }\n * `);\n *\n * isLeafType(schema.getType('Episode')); // => true\n * isLeafType(schema.getType('String')); // => true\n * isLeafType(schema.getType('Review')); // => false\n * ```\n */\nexport function isLeafType(type: unknown): type is GraphQLLeafType {\n return isScalarType(type) || isEnumType(type);\n}\n\n/**\n * Returns the value as a GraphQL leaf type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL leaf type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertLeafType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * }\n *\n * type Review {\n * stars: Int!\n * }\n *\n * type Query {\n * episode: Episode\n * review: Review\n * }\n * `);\n *\n * const episodeType = assertLeafType(schema.getType('Episode'));\n *\n * episodeType.toString(); // => 'Episode'\n * assertLeafType(schema.getType('Review')); // throws an error\n * ```\n */\nexport function assertLeafType(type: unknown): GraphQLLeafType {\n if (!isLeafType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL leaf type.`);\n }\n return type;\n}\n\n/** These types may describe the parent context of a selection set. */\nexport type GraphQLCompositeType =\n | GraphQLObjectType\n | GraphQLInterfaceType\n | GraphQLUnionType;\n\n/**\n * Returns true when the value is a GraphQL object, interface, or union type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQL object, interface, or union type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isCompositeType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * union SearchResult = User\n *\n * type Query {\n * node: Node\n * search: [SearchResult]\n * }\n * `);\n *\n * isCompositeType(schema.getType('User')); // => true\n * isCompositeType(schema.getType('Node')); // => true\n * isCompositeType(schema.getType('SearchResult')); // => true\n * isCompositeType(schema.getType('String')); // => false\n * ```\n */\nexport function isCompositeType(type: unknown): type is GraphQLCompositeType {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}\n\n/**\n * Returns the value as a GraphQL composite type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL composite type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertCompositeType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * node: Node\n * }\n * `);\n *\n * const userType = assertCompositeType(schema.getType('User'));\n *\n * userType.toString(); // => 'User'\n * assertCompositeType(schema.getType('String')); // throws an error\n * ```\n */\nexport function assertCompositeType(type: unknown): GraphQLCompositeType {\n if (!isCompositeType(type)) {\n throw new Error(\n `Expected ${inspect(type)} to be a GraphQL composite type.`,\n );\n }\n return type;\n}\n\n/** These types may describe the parent context of a selection set. */\nexport type GraphQLAbstractType = GraphQLInterfaceType | GraphQLUnionType;\n\n/**\n * Returns true when the value is a GraphQL interface or union type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQL interface or union type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { isAbstractType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * union SearchResult = User\n *\n * type Query {\n * node: Node\n * search: [SearchResult]\n * }\n * `);\n *\n * isAbstractType(schema.getType('Node')); // => true\n * isAbstractType(schema.getType('SearchResult')); // => true\n * isAbstractType(schema.getType('User')); // => false\n * ```\n */\nexport function isAbstractType(type: unknown): type is GraphQLAbstractType {\n return isInterfaceType(type) || isUnionType(type);\n}\n\n/**\n * Returns the value as a GraphQL abstract type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL abstract type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertAbstractType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * node: Node\n * }\n * `);\n *\n * const nodeType = assertAbstractType(schema.getType('Node'));\n *\n * nodeType.toString(); // => 'Node'\n * assertAbstractType(schema.getType('User')); // throws an error\n * ```\n */\nexport function assertAbstractType(type: unknown): GraphQLAbstractType {\n if (!isAbstractType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL abstract type.`);\n }\n return type;\n}\n\n/**\n * List Type Wrapper\n *\n * A list is a wrapping type which points to another type.\n * Lists are often created within the context of defining the fields of\n * an object type.\n * @typeParam T - The GraphQL type wrapped by this list type.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLObjectType } from 'graphql';\n *\n * const PersonType: GraphQLObjectType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * parents: { type: new GraphQLList(PersonType) },\n * children: { type: new GraphQLList(PersonType) },\n * }),\n * });\n * ```\n */\nexport class GraphQLList<\n T extends GraphQLType,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLList instances.\n * @private\n */\n readonly __kind: symbol;\n /** The type wrapped by this list or non-null type. */\n readonly ofType: T;\n // eslint-disable-next-line @typescript-eslint/no-unused-private-class-members\n declare private readonly __GraphQLListTypeBrand: never;\n\n /**\n * Creates a GraphQLList instance.\n * @param ofType - The type to wrap.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString } from 'graphql/type';\n *\n * const stringList = new GraphQLList(GraphQLString);\n *\n * stringList.ofType; // => GraphQLString\n * String(stringList); // => '[String]'\n * ```\n */\n constructor(ofType: T) {\n this.__kind = listSymbol;\n this.ofType = ofType;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLList';\n }\n\n /**\n * Returns this wrapping type as a GraphQL type-reference string.\n * @returns The GraphQL type-reference string.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLNonNull, GraphQLString } from 'graphql/type';\n *\n * const stringList = new GraphQLList(GraphQLString);\n * const requiredStringList = new GraphQLList(new GraphQLNonNull(GraphQLString));\n *\n * stringList.toString(); // => '[String]'\n * requiredStringList.toString(); // => '[String!]'\n * ```\n */\n toString(): string {\n return '[' + String(this.ofType) + ']';\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString } from 'graphql/type';\n *\n * const stringList = new GraphQLList(GraphQLString);\n *\n * stringList.toJSON(); // => '[String]'\n * JSON.stringify({ type: stringList }); // => '{\"type\":\"[String]\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/**\n * Non-Null Type Wrapper\n *\n * A non-null is a wrapping type which points to another type.\n * Non-null types enforce that their values are never null and can ensure\n * an error is raised if this ever occurs during a request. It is useful for\n * fields which you can make a strong guarantee on non-nullability, for example\n * usually the id field of a database row will never be null.\n * @typeParam T - The nullable GraphQL type wrapped by this non-null type.\n * @example\n * ```ts\n * import { GraphQLNonNull, GraphQLObjectType, GraphQLString } from 'graphql';\n *\n * const RowType = new GraphQLObjectType({\n * name: 'Row',\n * fields: () => ({\n * id: { type: new GraphQLNonNull(GraphQLString) },\n * }),\n * });\n * ```\n *\n * Note: the enforcement of non-nullability occurs within the executor.\n */\nexport class GraphQLNonNull<\n T extends GraphQLNullableType,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLNonNull instances.\n * @private\n */\n readonly __kind: symbol;\n /** The type wrapped by this list or non-null type. */\n readonly ofType: T;\n // eslint-disable-next-line @typescript-eslint/no-unused-private-class-members\n declare private readonly __GraphQLNonNullTypeBrand: never;\n\n /**\n * Creates a GraphQLNonNull instance.\n * @param ofType - The type to wrap.\n * @example\n * ```ts\n * import { GraphQLNonNull, GraphQLString } from 'graphql/type';\n *\n * const requiredString = new GraphQLNonNull(GraphQLString);\n *\n * requiredString.ofType; // => GraphQLString\n * String(requiredString); // => 'String!'\n * ```\n */\n constructor(ofType: T) {\n this.__kind = nonNullSymbol;\n this.ofType = ofType;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLNonNull';\n }\n\n /**\n * Returns this wrapping type as a GraphQL type-reference string.\n * @returns The GraphQL type-reference string.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLNonNull, GraphQLString } from 'graphql/type';\n *\n * const requiredString = new GraphQLNonNull(GraphQLString);\n * const requiredStringList = new GraphQLNonNull(new GraphQLList(GraphQLString));\n *\n * requiredString.toString(); // => 'String!'\n * requiredStringList.toString(); // => '[String]!'\n * ```\n */\n toString(): string {\n return String(this.ofType) + '!';\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLNonNull, GraphQLString } from 'graphql/type';\n *\n * const requiredString = new GraphQLNonNull(GraphQLString);\n *\n * requiredString.toJSON(); // => 'String!'\n * JSON.stringify({ type: requiredString }); // => '{\"type\":\"String!\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/** These types wrap and modify other types */\n\nexport type GraphQLWrappingType =\n | GraphQLList<GraphQLType>\n | GraphQLNonNull<GraphQLNullableType>;\n\n/**\n * Returns true when the value is a GraphQL list or non-null wrapper type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQL list or non-null wrapper type.\n * @example\n * ```ts\n * import {\n * GraphQLList,\n * GraphQLNonNull,\n * GraphQLString,\n * isWrappingType,\n * } from 'graphql/type';\n *\n * isWrappingType(new GraphQLList(GraphQLString)); // => true\n * isWrappingType(new GraphQLNonNull(GraphQLString)); // => true\n * isWrappingType(GraphQLString); // => false\n * ```\n */\nexport function isWrappingType(type: unknown): type is GraphQLWrappingType {\n return isListType(type) || isNonNullType(type);\n}\n\n/**\n * Returns the value as a GraphQL wrapping type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL wrapping type.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString, assertWrappingType } from 'graphql/type';\n *\n * const wrappingType = assertWrappingType(new GraphQLList(GraphQLString));\n *\n * wrappingType.toString(); // => '[String]'\n * assertWrappingType(GraphQLString); // throws an error\n * ```\n */\nexport function assertWrappingType(type: unknown): GraphQLWrappingType {\n if (!isWrappingType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL wrapping type.`);\n }\n return type;\n}\n\n/** These types can all accept null as a value. */\nexport type GraphQLNullableType = GraphQLNamedType | GraphQLList<GraphQLType>;\n\n/**\n * Returns true when the value is a GraphQL type that can accept null.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQL type that can accept null.\n * @example\n * ```ts\n * import { GraphQLNonNull, GraphQLString, isNullableType } from 'graphql/type';\n *\n * isNullableType(GraphQLString); // => true\n * isNullableType(new GraphQLNonNull(GraphQLString)); // => false\n * isNullableType(null); // => false\n * ```\n */\nexport function isNullableType(type: unknown): type is GraphQLNullableType {\n return isType(type) && !isNonNullType(type);\n}\n\n/**\n * Returns the value as a nullable GraphQL type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a nullable GraphQL type.\n * @example\n * ```ts\n * import {\n * GraphQLNonNull,\n * GraphQLString,\n * assertNullableType,\n * } from 'graphql/type';\n *\n * const nullableType = assertNullableType(GraphQLString); // => GraphQLString\n * assertNullableType(new GraphQLNonNull(GraphQLString)); // throws an error\n * ```\n */\nexport function assertNullableType(type: unknown): GraphQLNullableType {\n if (!isNullableType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL nullable type.`);\n }\n return type;\n}\n\n/**\n * Returns the nullable type.\n * @param type - The GraphQL type to inspect.\n * @returns The nullable type after removing one non-null wrapper, if present.\n * @example\n * ```ts\n * import { getNullableType } from 'graphql/type';\n *\n * getNullableType(null); // => undefined\n * getNullableType(undefined); // => undefined\n * ```\n */\nexport function getNullableType(type: undefined | null): void;\n/**\n * Returns the nullable type after removing one non-null wrapper.\n * @param type - A nullable type or non-null wrapper.\n * @returns The nullable type after removing one non-null wrapper, if present.\n * @typeParam T - The nullable GraphQL type returned after removing one non-null wrapper.\n * @example\n * ```ts\n * import {\n * GraphQLList,\n * GraphQLNonNull,\n * GraphQLString,\n * getNullableType,\n * } from 'graphql/type';\n *\n * const requiredString = new GraphQLNonNull(GraphQLString);\n * const stringList = new GraphQLList(GraphQLString);\n *\n * getNullableType(requiredString); // => GraphQLString\n * getNullableType(stringList); // => stringList\n * ```\n */\nexport function getNullableType<T extends GraphQLNullableType>(\n type: T | GraphQLNonNull<T>,\n): T;\n/**\n * Returns the nullable type after removing one non-null wrapper.\n * @param type - The GraphQL type to inspect.\n * @returns The nullable type after removing one non-null wrapper, if present.\n * @example\n * ```ts\n * import {\n * GraphQLList,\n * GraphQLNonNull,\n * GraphQLString,\n * getNullableType,\n * } from 'graphql/type';\n *\n * const requiredStringList = new GraphQLNonNull(new GraphQLList(GraphQLString));\n *\n * getNullableType(requiredStringList).toString(); // => '[String]'\n * getNullableType(GraphQLString); // => GraphQLString\n * ```\n */\nexport function getNullableType(\n type: Maybe<GraphQLType>,\n): GraphQLNullableType | undefined;\n/**\n * Returns the nullable type after removing one non-null wrapper.\n * @internal\n */\nexport function getNullableType(\n type: Maybe<GraphQLType>,\n): GraphQLNullableType | undefined {\n if (type) {\n return isNonNullType(type) ? type.ofType : type;\n }\n}\n\n/** These named types do not include modifiers like List or NonNull. */\nexport type GraphQLNamedType = GraphQLNamedInputType | GraphQLNamedOutputType;\n\n/** A named GraphQL type that can be used as an input type. */\nexport type GraphQLNamedInputType =\n | GraphQLScalarType\n | GraphQLEnumType\n | GraphQLInputObjectType;\n\n/** A named GraphQL type that can be used as an output type. */\nexport type GraphQLNamedOutputType =\n | GraphQLScalarType\n | GraphQLObjectType\n | GraphQLInterfaceType\n | GraphQLUnionType\n | GraphQLEnumType;\n\n/**\n * Returns true when the value is a GraphQL named type.\n * @param type - The GraphQL type to inspect.\n * @returns True when the value is a GraphQL named type.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString, isNamedType } from 'graphql/type';\n *\n * isNamedType(GraphQLString); // => true\n * isNamedType(new GraphQLList(GraphQLString)); // => false\n * isNamedType(null); // => false\n * ```\n */\nexport function isNamedType(type: unknown): type is GraphQLNamedType {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n isInputObjectType(type)\n );\n}\n\n/**\n * Returns the value as a GraphQL named type, or throws if it is not one.\n * @param type - The GraphQL type to inspect.\n * @returns The value typed as a GraphQL named type.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString, assertNamedType } from 'graphql/type';\n *\n * const namedType = assertNamedType(GraphQLString);\n *\n * namedType.name; // => 'String'\n * assertNamedType(new GraphQLList(GraphQLString)); // throws an error\n * ```\n */\nexport function assertNamedType(type: unknown): GraphQLNamedType {\n if (!isNamedType(type)) {\n throw new Error(`Expected ${inspect(type)} to be a GraphQL named type.`);\n }\n return type;\n}\n\n/**\n * Returns the named type.\n * @param type - The GraphQL type to inspect.\n * @returns The named type after unwrapping all list and non-null wrappers.\n * @example\n * ```ts\n * import { getNamedType } from 'graphql/type';\n *\n * getNamedType(null); // => undefined\n * getNamedType(undefined); // => undefined\n * ```\n */\nexport function getNamedType(type: undefined | null): void;\n/**\n * Returns the named input type after unwrapping all list and non-null wrappers.\n * @param type - The GraphQL input type to inspect.\n * @returns The named input type after unwrapping all wrappers.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { getNamedType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Query {\n * review(input: [ReviewInput!]!): Boolean\n * }\n * `);\n *\n * const inputArg = schema.getQueryType()?.getFields().review.args[0];\n *\n * getNamedType(inputArg?.type)?.toString(); // => 'ReviewInput'\n * ```\n */\nexport function getNamedType(type: GraphQLInputType): GraphQLNamedInputType;\n/**\n * Returns the named output type after unwrapping all list and non-null wrappers.\n * @param type - The GraphQL output type to inspect.\n * @returns The named output type after unwrapping all wrappers.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { getNamedType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type User {\n * name: String\n * }\n *\n * type Query {\n * users: [User!]!\n * }\n * `);\n *\n * const usersField = schema.getQueryType()?.getFields().users;\n *\n * getNamedType(usersField?.type)?.toString(); // => 'User'\n * ```\n */\nexport function getNamedType(type: GraphQLOutputType): GraphQLNamedOutputType;\n/**\n * Returns the named type after unwrapping all list and non-null wrappers.\n * @param type - The GraphQL type to inspect.\n * @returns The named type after unwrapping all wrappers.\n * @example\n * ```ts\n * import {\n * GraphQLList,\n * GraphQLNonNull,\n * GraphQLString,\n * getNamedType,\n * } from 'graphql/type';\n *\n * const nestedType = new GraphQLNonNull(\n * new GraphQLList(new GraphQLNonNull(GraphQLString)),\n * );\n *\n * getNamedType(nestedType); // => GraphQLString\n * ```\n */\nexport function getNamedType(type: GraphQLType): GraphQLNamedType;\n/**\n * Returns the named type after unwrapping all list and non-null wrappers.\n * @param type - The GraphQL type to inspect.\n * @returns The named type after unwrapping all wrappers, or undefined for nullish input.\n * @example\n * ```ts\n * import { GraphQLList, GraphQLString, getNamedType } from 'graphql/type';\n *\n * getNamedType(new GraphQLList(GraphQLString)); // => GraphQLString\n * getNamedType(undefined); // => undefined\n * ```\n */\nexport function getNamedType(\n type: Maybe<GraphQLType>,\n): GraphQLNamedType | undefined;\n/**\n * Returns the named type after unwrapping all list and non-null wrappers.\n * @internal\n */\nexport function getNamedType(\n type: Maybe<GraphQLType>,\n): GraphQLNamedType | undefined {\n if (type) {\n let unwrappedType = type;\n while (isWrappingType(unwrappedType)) {\n unwrappedType = unwrappedType.ofType;\n }\n return unwrappedType;\n }\n}\n\n/**\n * An interface for all Schema Elements.\n *\n * @internal\n */\n\nexport interface GraphQLSchemaElement {\n toString: () => string;\n toJSON: () => string;\n}\n\n/**\n * Used while defining GraphQL types to allow for circular references in\n * otherwise immutable type definitions.\n * @typeParam T - The element type returned by the thunk or array.\n */\nexport type ThunkReadonlyArray<T> = (() => ReadonlyArray<T>) | ReadonlyArray<T>;\n/**\n * A thunk that resolves to an object map.\n * @typeParam T - Value type stored in the object map.\n */\nexport type ThunkObjMap<T> = (() => ObjMap<T>) | ObjMap<T>;\n\n/**\n * Resolves a thunked readonly array.\n * @param thunk - The thunk or value to resolve.\n * @returns The resolved readonly array.\n * @typeParam T - The element type resolved from the thunk or array.\n * @example\n * ```ts\n * import { GraphQLString, resolveReadonlyArrayThunk } from 'graphql/type';\n *\n * const lazyFields = resolveReadonlyArrayThunk(() => [GraphQLString]); // => [GraphQLString]\n * const fields = resolveReadonlyArrayThunk([GraphQLString]); // => [GraphQLString]\n * ```\n */\nexport function resolveReadonlyArrayThunk<T>(\n thunk: ThunkReadonlyArray<T>,\n): ReadonlyArray<T> {\n return typeof thunk === 'function' ? thunk() : thunk;\n}\n\n/**\n * Resolves a thunked object map.\n * @param thunk - The thunk or value to resolve.\n * @returns The resolved object map.\n * @typeParam T - The object-map value type resolved from the thunk or map.\n * @example\n * ```ts\n * import { GraphQLString, resolveObjMapThunk } from 'graphql/type';\n *\n * const lazyFields = resolveObjMapThunk(() => ({ name: GraphQLString }));\n * const fields = resolveObjMapThunk({ name: GraphQLString });\n *\n * lazyFields.name; // => GraphQLString\n * fields.name; // => GraphQLString\n * ```\n */\nexport function resolveObjMapThunk<T>(thunk: ThunkObjMap<T>): ObjMap<T> {\n return typeof thunk === 'function' ? thunk() : thunk;\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLScalarTypeExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Scalar Type Definition\n *\n * Scalar types define the leaf values of a GraphQL response and the input\n * values accepted by arguments and input object fields. A scalar type has a\n * name and coercion functions that validate and convert runtime values and\n * GraphQL literals.\n *\n * If a type's coerceOutputValue function returns `null` or does not return a\n * value (i.e. it returns `undefined`) then an error will be raised and a\n * `null` value will be returned in the response. Prefer validating inputs\n * before execution so clients receive input diagnostics before result coercion\n * fails.\n * Custom scalar behavior is defined via the following functions:\n *\n * - coerceOutputValue(value): Implements \"Result Coercion\". Given an internal value,\n * produces an external value valid for this type. Returns undefined or\n * throws an error to indicate invalid values.\n *\n * - coerceInputValue(value): Implements \"Input Coercion\" for values. Given an\n * external value (for example, variable values), produces an internal value\n * valid for this type. Returns undefined or throws an error to indicate\n * invalid values.\n *\n * - coerceInputLiteral(ast): Implements \"Input Coercion\" for constant literals.\n * Given a GraphQL literal (AST) (for example, an argument value), produces\n * an internal value valid for this type. Returns undefined or throws an\n * error to indicate invalid values.\n *\n * - valueToLiteral(value): Converts an external value to a GraphQL\n * literal (AST). Returns undefined or throws an error to indicate\n * invalid values.\n *\n * Deprecated, to be removed in v18:\n *\n * - serialize(value): Implements \"Result Coercion\". Renamed to\n * `coerceOutputValue()`.\n *\n * - parseValue(value): Implements \"Input Coercion\" for values. Renamed to\n * `coerceInputValue()`.\n *\n * - parseLiteral(ast): Implements \"Input Coercion\" for literals including\n * non-specified replacement of variables embedded within complex scalars.\n * Replaced by the combination of the `replaceVariables()` utility and the\n * `coerceInputLiteral()` method.\n * @typeParam TInternal - Internal runtime representation for this scalar.\n * @typeParam TExternal - External representation accepted from or returned to callers.\n * @example\n * ```ts\n * import { GraphQLScalarType, Kind } from 'graphql';\n *\n * const ensureOdd = (value: unknown) => {\n * if (typeof value !== 'number' || !Number.isInteger(value)) {\n * throw new Error(\n * `Scalar \"Odd\" cannot represent \"${value}\" since it is not an integer.`,\n * );\n * }\n *\n * if (value % 2 === 0) {\n * throw new Error(\n * `Scalar \"Odd\" cannot represent \"${value}\" since it is even.`,\n * );\n * }\n *\n * return value;\n * };\n *\n * const OddType = new GraphQLScalarType({\n * name: 'Odd',\n * coerceOutputValue: (value) => {\n * return ensureOdd(value);\n * },\n * coerceInputValue: (value) => {\n * return ensureOdd(value);\n * },\n * valueToLiteral: (value) => {\n * return { kind: Kind.INT, value: String(ensureOdd(value)) };\n * },\n * });\n *\n * OddType.coerceInputValue(3); // => 3\n * OddType.coerceInputValue(2); // throws an error\n * OddType.coerceInputValue(1.5); // throws an error\n * ```\n */\nexport class GraphQLScalarType<\n TInternal = unknown,\n TExternal = TInternal,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLScalarType instances.\n * @private\n */\n readonly __kind: symbol;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** URL identifying the behavior specified for this custom scalar. */\n specifiedByURL: Maybe<string>;\n /**\n * Deprecated legacy serializer used to convert internal values for response\n * output. Use `coerceOutputValue()` instead.\n * @deprecated use `coerceOutputValue()` instead, `serialize()` will be removed in v18\n */\n serialize: GraphQLScalarSerializer<TExternal>;\n /**\n * Deprecated legacy parser used to convert externally provided input values.\n * Use `coerceInputValue()` instead.\n * @deprecated use `coerceInputValue()` instead, `parseValue()` will be removed in v18\n */\n parseValue: GraphQLScalarValueParser<TInternal>;\n /**\n * Deprecated legacy parser used to convert externally provided input\n * literals. Use `replaceVariables()` and `coerceInputLiteral()` instead.\n * @deprecated use `replaceVariables()` and `coerceInputLiteral()` instead, `parseLiteral()` will be removed in v18\n */\n parseLiteral: GraphQLScalarLiteralParser<TInternal>;\n /** Coercer used to convert internal scalar values for response output. */\n coerceOutputValue: GraphQLScalarOutputValueCoercer<TExternal>;\n /** Coercer used to convert externally provided scalar input values. */\n coerceInputValue: GraphQLScalarInputValueCoercer<TInternal>;\n /** Coercer used to convert GraphQL scalar input literals. */\n coerceInputLiteral: GraphQLScalarInputLiteralCoercer<TInternal> | undefined;\n /** Converter used to produce GraphQL literals from runtime input values. */\n valueToLiteral: GraphQLScalarValueToLiteral | undefined;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLScalarTypeExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<ScalarTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes: ReadonlyArray<ScalarTypeExtensionNode>;\n\n /**\n * Creates a GraphQLScalarType instance.\n * @param config - Configuration describing this object.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { Kind, parse } from 'graphql/language';\n * import { GraphQLScalarType } from 'graphql/type';\n *\n * const document = parse(`\n * \"Odd integer values.\"\n * scalar Odd @specifiedBy(url: \"https://example.com/odd\")\n *\n * extend scalar Odd @specifiedBy(url: \"https://example.com/odd-v2\")\n * `);\n * assert(document.definitions[0].kind === Kind.SCALAR_TYPE_DEFINITION);\n * assert(document.definitions[1].kind === Kind.SCALAR_TYPE_EXTENSION);\n *\n * const ensureOdd = (value: unknown) => {\n * if (\n * typeof value !== 'number' ||\n * !Number.isInteger(value) ||\n * value % 2 === 0\n * ) {\n * throw new TypeError('Odd can only accept odd integers.');\n * }\n * return value;\n * };\n *\n * const Odd = new GraphQLScalarType({\n * name: 'Odd',\n * description: 'Odd integer values.',\n * specifiedByURL: 'https://example.com/odd',\n * coerceOutputValue: ensureOdd,\n * coerceInputValue: ensureOdd,\n * coerceInputLiteral: (ast) => {\n * if (ast.kind !== Kind.INT) {\n * throw new TypeError('Odd can only accept integer literals.');\n * }\n * return ensureOdd(Number(ast.value));\n * },\n * valueToLiteral: (value) => {\n * return { kind: Kind.INT, value: String(ensureOdd(value)) };\n * },\n * extensions: { numeric: true },\n * astNode: document.definitions[0],\n * extensionASTNodes: [document.definitions[1]],\n * });\n *\n * Odd.description; // => 'Odd integer values.'\n * Odd.specifiedByURL; // => 'https://example.com/odd'\n * Odd.coerceOutputValue(3); // => 3\n * Odd.coerceInputValue(5); // => 5\n * Odd.valueToLiteral?.(3); // => { kind: 'IntValue', value: '3' }\n * Odd.valueToLiteral?.(2); // throws an error\n * Odd.valueToLiteral?.(1.5); // throws an error\n * Odd.extensions; // => { numeric: true }\n * ```\n */\n constructor(config: Readonly<GraphQLScalarTypeConfig<TInternal, TExternal>>) {\n this.__kind = scalarSymbol;\n this.name = assertName(config.name);\n this.description = config.description;\n this.specifiedByURL = config.specifiedByURL;\n this.serialize =\n config.serialize ??\n config.coerceOutputValue ??\n (identityFunc as GraphQLScalarSerializer<TExternal>);\n this.parseValue =\n config.parseValue ??\n config.coerceInputValue ??\n (identityFunc as GraphQLScalarValueParser<TInternal>);\n this.parseLiteral =\n config.parseLiteral ??\n ((node, variables) =>\n this.coerceInputValue(valueFromASTUntyped(node, variables)));\n this.coerceOutputValue = config.coerceOutputValue ?? this.serialize;\n this.coerceInputValue = config.coerceInputValue ?? this.parseValue;\n this.coerceInputLiteral = config.coerceInputLiteral;\n this.valueToLiteral = config.valueToLiteral;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes ?? [];\n\n if (config.parseLiteral) {\n devAssert(\n typeof config.parseValue === 'function' &&\n typeof config.parseLiteral === 'function',\n `${this.name} must provide both \"parseValue\" and \"parseLiteral\" functions.`,\n );\n }\n\n if (config.coerceInputLiteral) {\n devAssert(\n typeof config.coerceInputValue === 'function' &&\n typeof config.coerceInputLiteral === 'function',\n `${this.name} must provide both \"coerceInputValue\" and \"coerceInputLiteral\" functions.`,\n );\n }\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLScalarType';\n }\n\n /**\n * Returns a normalized configuration object for this object.\n * @returns A configuration object that can be used to recreate this object.\n * @example\n * ```ts\n * import { GraphQLScalarType } from 'graphql/type';\n *\n * const Url = new GraphQLScalarType({\n * name: 'Url',\n * description: 'An absolute URL string.',\n * specifiedByURL: 'https://url.spec.whatwg.org/',\n * });\n *\n * const config = Url.toConfig();\n * const UrlCopy = new GraphQLScalarType(config);\n *\n * config.name; // => 'Url'\n * config.specifiedByURL; // => 'https://url.spec.whatwg.org/'\n * UrlCopy.name; // => Url.name\n * ```\n */\n toConfig(): GraphQLScalarTypeNormalizedConfig<TInternal, TExternal> {\n return {\n name: this.name,\n description: this.description,\n specifiedByURL: this.specifiedByURL,\n serialize: this.serialize,\n parseValue: this.parseValue,\n parseLiteral: this.parseLiteral,\n coerceOutputValue: this.coerceOutputValue,\n coerceInputValue: this.coerceInputValue,\n coerceInputLiteral: this.coerceInputLiteral,\n valueToLiteral: this.valueToLiteral,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n /**\n * Returns the schema coordinate identifying this scalar type.\n * @returns The schema coordinate for this scalar type.\n * @example\n * ```ts\n * import { GraphQLScalarType } from 'graphql/type';\n *\n * const DateTime = new GraphQLScalarType({ name: 'DateTime' });\n *\n * DateTime.toString(); // => 'DateTime'\n * String(DateTime); // => 'DateTime'\n * ```\n */\n toString(): string {\n return this.name;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLScalarType } from 'graphql/type';\n *\n * const DateTime = new GraphQLScalarType({ name: 'DateTime' });\n *\n * DateTime.toJSON(); // => 'DateTime'\n * JSON.stringify({ type: DateTime }); // => '{\"type\":\"DateTime\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/**\n * Deprecated function type that serializes a runtime value as a scalar output\n * value. Use `GraphQLScalarOutputValueCoercer` instead.\n * @typeParam TExternal - External representation accepted from or returned to callers.\n * @deprecated Use GraphQLScalarOutputValueCoercer instead. Will be removed in v18.\n */\nexport type GraphQLScalarSerializer<TExternal> = (\n outputValue: unknown,\n) => TExternal;\n\n/**\n * Function used to coerce internal scalar values for response output.\n * @typeParam TExternal - External representation accepted from or returned to callers.\n */\nexport type GraphQLScalarOutputValueCoercer<TExternal> = (\n outputValue: unknown,\n) => TExternal;\n\n/**\n * Deprecated function type that parses a runtime input value as a scalar input\n * value. Use `GraphQLScalarInputValueCoercer` instead.\n * @typeParam TInternal - Internal runtime representation for this scalar.\n * @deprecated Use GraphQLScalarInputValueCoercer instead. Will be removed in v18.\n */\nexport type GraphQLScalarValueParser<TInternal> = (\n inputValue: unknown,\n) => TInternal;\n\n/**\n * Function used to coerce externally provided scalar input values.\n * @typeParam TInternal - Internal runtime representation for this scalar.\n */\nexport type GraphQLScalarInputValueCoercer<TInternal> = (\n inputValue: unknown,\n) => TInternal;\n\n/**\n * Deprecated function type that parses a GraphQL value literal as a scalar\n * input value. Use `GraphQLScalarInputLiteralCoercer` instead.\n * @typeParam TInternal - Internal runtime representation for this scalar.\n * @deprecated Use GraphQLScalarInputLiteralCoercer instead. Will be removed in v18.\n */\nexport type GraphQLScalarLiteralParser<TInternal> = (\n valueNode: ValueNode,\n variables: Maybe<ObjMap<unknown>>,\n) => Maybe<TInternal>;\n\n/**\n * Function used to coerce GraphQL scalar input literals.\n * @typeParam TInternal - Internal runtime representation for this scalar.\n */\nexport type GraphQLScalarInputLiteralCoercer<TInternal> = (\n valueNode: ConstValueNode,\n) => Maybe<TInternal>;\n\n/** @internal */\nexport type GraphQLScalarValueToLiteral = (\n inputValue: unknown,\n) => ConstValueNode | undefined;\n\n/**\n * Configuration used to construct a GraphQLScalarType.\n * @typeParam TInternal - Internal runtime representation for this scalar.\n * @typeParam TExternal - External representation accepted from or returned to callers.\n */\nexport interface GraphQLScalarTypeConfig<TInternal, TExternal> {\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** URL identifying the behavior specified for this custom scalar. */\n specifiedByURL?: Maybe<string>;\n /**\n * Deprecated legacy serializer used to convert internal values for response\n * output. Use `coerceOutputValue()` instead.\n * @deprecated use `coerceOutputValue()` instead, `serialize()` will be removed in v18\n */\n serialize?: GraphQLScalarSerializer<TExternal> | undefined;\n /**\n * Deprecated legacy parser used to convert externally provided input values.\n * Use `coerceInputValue()` instead.\n * @deprecated use `coerceInputValue()` instead, `parseValue()` will be removed in v18\n */\n parseValue?: GraphQLScalarValueParser<TInternal> | undefined;\n /**\n * Deprecated legacy parser used to convert externally provided input\n * literals. Use `replaceVariables()` and `coerceInputLiteral()` instead.\n * @deprecated use `replaceVariables()` and `coerceInputLiteral()` instead, `parseLiteral()` will be removed in v18\n */\n parseLiteral?: GraphQLScalarLiteralParser<TInternal> | undefined;\n /** Coerces an internal value to include in a response. */\n coerceOutputValue?: GraphQLScalarOutputValueCoercer<TExternal> | undefined;\n /** Coerces an externally provided value to use as an input. */\n coerceInputValue?: GraphQLScalarInputValueCoercer<TInternal> | undefined;\n /** Coerces an externally provided const literal value to use as an input. */\n coerceInputLiteral?: GraphQLScalarInputLiteralCoercer<TInternal> | undefined;\n /** Translates an externally provided value to a literal (AST). */\n valueToLiteral?: GraphQLScalarValueToLiteral | undefined;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLScalarTypeExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<ScalarTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes?: Maybe<ReadonlyArray<ScalarTypeExtensionNode>>;\n}\n\n/** @internal */\nexport interface GraphQLScalarTypeNormalizedConfig<\n TInternal,\n TExternal,\n> extends GraphQLScalarTypeConfig<TInternal, TExternal> {\n serialize: GraphQLScalarSerializer<TExternal>;\n parseValue: GraphQLScalarValueParser<TInternal>;\n parseLiteral: GraphQLScalarLiteralParser<TInternal>;\n coerceOutputValue: GraphQLScalarOutputValueCoercer<TExternal>;\n coerceInputValue: GraphQLScalarInputValueCoercer<TInternal>;\n coerceInputLiteral: GraphQLScalarInputLiteralCoercer<TInternal> | undefined;\n extensions: Readonly<GraphQLScalarTypeExtensions>;\n extensionASTNodes: ReadonlyArray<ScalarTypeExtensionNode>;\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n * We've provided these template arguments because this is an open type and\n * you may find them useful.\n * @typeParam _TSource - Reserved source type parameter for extension typing.\n * @typeParam _TContext - Reserved context type parameter for extension typing.\n */\nexport interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Object Type Definition\n *\n * Almost all of the GraphQL types you define will be object types. Object types\n * have a name, but most importantly describe their fields.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @typeParam TAbstract - Runtime value type used for abstract type resolution.\n * @example\n * ```ts\n * import { GraphQLInt, GraphQLObjectType, GraphQLString } from 'graphql';\n *\n * const AddressType = new GraphQLObjectType({\n * name: 'Address',\n * fields: {\n * street: { type: GraphQLString },\n * number: { type: GraphQLInt },\n * formatted: {\n * type: GraphQLString,\n * resolve: (obj) => {\n * return obj.number + ' ' + obj.street;\n * },\n * },\n * },\n * });\n * ```\n * @example\n * When two types need to refer to each other, or a type needs to refer to\n * itself in a field, you can use a function expression (aka a closure or a\n * thunk) to supply the fields lazily.\n *\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql';\n *\n * const PersonType: GraphQLObjectType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * name: { type: GraphQLString },\n * bestFriend: { type: PersonType },\n * }),\n * });\n * ```\n */\nexport class GraphQLObjectType<\n TSource = any,\n TContext = any,\n TAbstract = any,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLObjectType instances.\n * @private\n */\n readonly __kind: typeof objectSymbol = objectSymbol;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** Predicate used to determine whether a runtime value belongs to this object type. */\n isTypeOf: Maybe<GraphQLIsTypeOfFn<TAbstract, TContext>>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<ObjectTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes: ReadonlyArray<ObjectTypeExtensionNode>;\n\n private _fields: ThunkObjMap<GraphQLField<TSource, TContext>>;\n private _interfaces: ThunkReadonlyArray<GraphQLInterfaceType>;\n\n /**\n * Creates a GraphQLObjectType instance.\n * @param config - Configuration describing this object.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * // Configure an object type with interfaces, fields, arguments, and metadata.\n * import { parse, Kind } from 'graphql/language';\n * import {\n * GraphQLID,\n * GraphQLInterfaceType,\n * GraphQLNonNull,\n * GraphQLObjectType,\n * GraphQLString,\n * } from 'graphql/type';\n *\n * const document = parse(`\n * type User implements Node {\n * id: ID!\n * name(format: String = \"short\"): String\n * }\n *\n * extend type User {\n * displayName: String\n * }\n * `);\n * assert(document.definitions[0].kind === Kind.OBJECT_TYPE_DEFINITION);\n * assert(document.definitions[1].kind === Kind.OBJECT_TYPE_EXTENSION);\n * const definition = document.definitions[0];\n * const nameField = definition.fields?.[1];\n * const formatArg = nameField?.arguments?.[0];\n *\n * const Node = new GraphQLInterfaceType({\n * name: 'Node',\n * fields: {\n * id: { type: new GraphQLNonNull(GraphQLID) },\n * },\n * });\n *\n * const User = new GraphQLObjectType({\n * name: 'User',\n * description: 'A registered user.',\n * interfaces: [Node],\n * fields: {\n * id: { type: new GraphQLNonNull(GraphQLID) },\n * name: {\n * description: 'The formatted user name.',\n * type: GraphQLString,\n * args: {\n * format: {\n * description: 'Controls the name format.',\n * type: GraphQLString,\n * default: { value: 'short' },\n * deprecationReason: 'Use locale instead.',\n * extensions: { public: true },\n * astNode: formatArg,\n * },\n * },\n * resolve: (user, { format }) => {\n * return format === 'long' ? user.fullName : user.name;\n * },\n * deprecationReason: 'Use displayName.',\n * extensions: { cacheSeconds: 60 },\n * astNode: nameField,\n * },\n * },\n * isTypeOf: (value) => {\n * return typeof value === 'object' && value != null && 'id' in value;\n * },\n * extensions: { entity: 'User' },\n * astNode: definition,\n * extensionASTNodes: [document.definitions[1]],\n * });\n *\n * User.name; // => 'User'\n * User.getInterfaces(); // => [Node]\n * Object.keys(User.getFields()); // => ['id', 'name']\n * User.getFields().name.args[0].default?.value; // => 'short'\n * User.extensions; // => { entity: 'User' }\n * ```\n * @example\n * ```ts\n * // This variant configures a subscription field with subscribe and resolve functions.\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n *\n * const Subscription = new GraphQLObjectType({\n * name: 'Subscription',\n * fields: {\n * greeting: {\n * type: GraphQLString,\n * subscribe: async function* () {\n * yield { greeting: 'Hello!' };\n * },\n * resolve: (event) => {\n * return event.greeting;\n * },\n * },\n * },\n * });\n *\n * typeof Subscription.getFields().greeting.subscribe; // => 'function'\n * ```\n */\n constructor(\n config: Readonly<GraphQLObjectTypeConfig<TSource, TContext, TAbstract>>,\n ) {\n this.__kind = objectSymbol;\n this.name = assertName(config.name);\n this.description = config.description;\n this.isTypeOf = config.isTypeOf;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes ?? [];\n this._fields = (defineFieldMap<TSource, TContext>).bind(\n undefined,\n this,\n config.fields,\n );\n this._interfaces = defineInterfaces.bind(undefined, config.interfaces);\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLObjectType';\n }\n\n /**\n * Returns the fields defined by this type.\n * @returns The fields keyed by field name.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type User {\n * id: ID!\n * name: String\n * }\n *\n * type Query {\n * viewer: User\n * }\n * `);\n *\n * const User = assertObjectType(schema.getType('User'));\n * const fields = User.getFields();\n *\n * Object.keys(fields); // => ['id', 'name']\n * String(fields.id.type); // => 'ID!'\n * ```\n */\n getFields(): GraphQLFieldMap<TSource, TContext> {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n return this._fields;\n }\n\n /**\n * Returns the interfaces implemented by this type.\n * @returns The implemented interfaces.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * viewer: User\n * }\n * `);\n *\n * const User = assertObjectType(schema.getType('User'));\n *\n * User.getInterfaces().map((type) => type.name); // => ['Node']\n * ```\n */\n getInterfaces(): ReadonlyArray<GraphQLInterfaceType> {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n return this._interfaces;\n }\n\n /**\n * Returns a normalized configuration object for this object.\n * @returns A configuration object that can be used to recreate this object.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n *\n * const User = new GraphQLObjectType({\n * name: 'User',\n * fields: {\n * name: { type: GraphQLString },\n * },\n * });\n *\n * const config = User.toConfig();\n * const UserCopy = new GraphQLObjectType(config);\n *\n * config.fields.name.type; // => GraphQLString\n * UserCopy.getFields().name.type; // => GraphQLString\n * ```\n */\n toConfig(): GraphQLObjectTypeNormalizedConfig<TSource, TContext, TAbstract> {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: mapValue(this.getFields(), (field) => field.toConfig()),\n isTypeOf: this.isTypeOf,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n /**\n * Returns the schema coordinate identifying this object type.\n * @returns The schema coordinate for this object type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type User {\n * name: String\n * }\n *\n * type Query {\n * viewer: User\n * }\n * `);\n *\n * const User = assertObjectType(schema.getType('User'));\n *\n * User.toString(); // => 'User'\n * ```\n */\n toString(): string {\n return this.name;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n *\n * const User = new GraphQLObjectType({\n * name: 'User',\n * fields: { name: { type: GraphQLString } },\n * });\n *\n * User.toJSON(); // => 'User'\n * JSON.stringify({ type: User }); // => '{\"type\":\"User\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\nfunction defineInterfaces(\n interfaces: Maybe<ThunkReadonlyArray<GraphQLInterfaceType>>,\n): ReadonlyArray<GraphQLInterfaceType> {\n return resolveReadonlyArrayThunk(interfaces ?? []);\n}\n\nfunction defineFieldMap<TSource, TContext>(\n parentType:\n | GraphQLObjectType<TSource, TContext>\n | GraphQLInterfaceType<TSource, TContext>,\n fields: ThunkObjMap<GraphQLFieldConfig<TSource, TContext>>,\n): GraphQLFieldMap<TSource, TContext> {\n const fieldMap = resolveObjMapThunk(fields);\n\n return mapValue(\n fieldMap,\n (fieldConfig, fieldName) =>\n new GraphQLField(parentType, fieldName, fieldConfig),\n );\n}\n\n/**\n * Configuration used to construct a GraphQLObjectType.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @typeParam TAbstract - Runtime value type used for abstract type resolution.\n */\nexport interface GraphQLObjectTypeConfig<\n TSource,\n TContext,\n TAbstract = unknown,\n> {\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** Interfaces implemented by this object or interface type. */\n interfaces?: ThunkReadonlyArray<GraphQLInterfaceType> | undefined;\n /** Fields declared by this object, interface, input object, or literal. */\n fields: ThunkObjMap<GraphQLFieldConfig<TSource, TContext>>;\n /** Predicate used to determine whether a runtime value belongs to this object type. */\n isTypeOf?: Maybe<GraphQLIsTypeOfFn<TAbstract, TContext>>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<ObjectTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes?: Maybe<ReadonlyArray<ObjectTypeExtensionNode>>;\n}\n\n/** @internal */\nexport interface GraphQLObjectTypeNormalizedConfig<\n TSource,\n TContext,\n TAbstract = unknown,\n> extends GraphQLObjectTypeConfig<TSource, TContext, TAbstract> {\n interfaces: ReadonlyArray<GraphQLInterfaceType>;\n fields: GraphQLFieldNormalizedConfigMap<TSource, TContext>;\n extensions: Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>;\n extensionASTNodes: ReadonlyArray<ObjectTypeExtensionNode>;\n}\n\n/**\n * Resolves the concrete object type for an abstract GraphQL type.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n */\nexport type GraphQLTypeResolver<TSource, TContext> = (\n value: TSource,\n context: TContext,\n info: GraphQLResolveInfo,\n abstractType: GraphQLAbstractType,\n) => PromiseOrValue<string | undefined>;\n\n/**\n * Checks whether a runtime value belongs to a GraphQL object type.\n * @typeParam TAbstract - Runtime value type used for abstract type resolution.\n * @typeParam TContext - Context object type passed to resolvers.\n */\nexport type GraphQLIsTypeOfFn<TAbstract, TContext> = (\n value: TAbstract,\n context: TContext,\n info: GraphQLResolveInfo,\n) => PromiseOrValue<boolean>;\n\n/**\n * Resolves the runtime value for a GraphQL field.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @typeParam TArgs - Argument object type passed to resolvers.\n * @typeParam TResult - Result value type.\n */\nexport type GraphQLFieldResolver<\n TSource,\n TContext,\n TArgs = any,\n TResult = unknown,\n> = (\n source: TSource,\n args: TArgs,\n context: TContext,\n info: GraphQLResolveInfo,\n) => TResult;\n\n/** Utilities available from resolver info for tracking asynchronous work. */\nexport interface GraphQLResolveInfoHelpers {\n /**\n * Promise.all wrapper that allows rejected branches to be tracked\n * as execution async work.\n *\n * Intended use: return or await this promise from resolver work.\n * Un-awaited async side effects are an anti-pattern:\n *\n * const { promiseAll } = info.getAsyncHelpers();\n * promiseAll([someAsyncWork(), someOtherAsyncWork()]).catch(() => undefined);\n *\n * In that anti-pattern, tracking starts only after rejection (on a\n * later microtask), so this work is not guaranteed to delay\n * `hooks.asyncWorkFinished`.\n *\n * Use `track(...)` for un-awaited async side effects:\n *\n * const { track } = info.getAsyncHelpers();\n * track([\n * someAsyncWork().catch(() => undefined),\n * someOtherAsyncWork().catch(() => undefined)\n * ]);\n */\n readonly promiseAll: <T>(\n values: ReadonlyArray<PromiseLike<T> | T>,\n ) => Promise<Array<T>>;\n /** Tracks asynchronous work that should delay execution completion hooks. */\n readonly track: (maybePromises: ReadonlyArray<unknown>) => void;\n}\n\n/** Information about the currently executing GraphQL field. */\nexport interface GraphQLResolveInfo {\n /** Name of the field being resolved. */\n readonly fieldName: string;\n /** AST field nodes that contributed to the current field execution. */\n readonly fieldNodes: ReadonlyArray<FieldNode>;\n /** GraphQL output type declared for the current field. */\n readonly returnType: GraphQLOutputType;\n /** Object type that owns the current field. */\n readonly parentType: GraphQLObjectType;\n /** Response path of the field being resolved. */\n readonly path: Path;\n /** The schema being executed. */\n readonly schema: GraphQLSchema;\n /** Fragment definitions in the operation document keyed by fragment name. */\n readonly fragments: ObjMap<FragmentDefinitionNode>;\n /** Initial root value passed to the operation. */\n readonly rootValue: unknown;\n /** The operation selected for execution. */\n readonly operation: OperationDefinitionNode;\n /**\n * Coerced variable values and source metadata for this operation. Resolver\n * code that needs runtime variable values should read `variableValues.coerced`.\n */\n readonly variableValues: VariableValues;\n /** Returns the AbortSignal supplied for this execution, if any. */\n readonly getAbortSignal: () => AbortSignal | undefined;\n /** Returns helper functions for tracking asynchronous resolver work. */\n readonly getAsyncHelpers: () => GraphQLResolveInfoHelpers;\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n * We've provided these template arguments because this is an open type and\n * you may find them useful.\n * @typeParam _TSource - Reserved source type parameter for extension typing.\n * @typeParam _TContext - Reserved context type parameter for extension typing.\n * @typeParam _TArgs - Reserved argument type parameter for extension typing.\n */\nexport interface GraphQLFieldExtensions<_TSource, _TContext, _TArgs = any> {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Configuration used to define a GraphQL field.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @typeParam TArgs - Argument object type passed to resolvers.\n */\nexport interface GraphQLFieldConfig<TSource, TContext, TArgs = any> {\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** The GraphQL type reference or runtime type for this element. */\n type: GraphQLOutputType;\n /** Arguments accepted by this field or directive. */\n args?: GraphQLFieldConfigArgumentMap | undefined;\n /** Resolver function used to produce this field value. */\n resolve?: GraphQLFieldResolver<TSource, TContext, TArgs> | undefined;\n /** Resolver function used to create a subscription event stream for this field. */\n subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs> | undefined;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason?: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<\n Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>\n >;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<FieldDefinitionNode>;\n}\n\n/** @internal */\nexport interface GraphQLFieldNormalizedConfig<\n TSource,\n TContext,\n TArgs = any,\n> extends GraphQLFieldConfig<TSource, TContext, TArgs> {\n args: GraphQLFieldNormalizedConfigArgumentMap;\n extensions: Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>;\n}\n\n/** A map of argument names to argument configuration objects. */\nexport type GraphQLFieldConfigArgumentMap = ObjMap<GraphQLArgumentConfig>;\n\n/** @internal */\nexport type GraphQLFieldNormalizedConfigArgumentMap =\n ObjMap<GraphQLArgumentNormalizedConfig>;\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLArgumentExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/** Configuration used to define a GraphQL argument. */\nexport interface GraphQLArgumentConfig {\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** The GraphQL type reference or runtime type for this element. */\n type: GraphQLInputType;\n /**\n * Deprecated legacy default value for this argument. Use `default` instead.\n * @deprecated use `default` instead, `defaultValue` will be removed in v18\n */\n defaultValue?: unknown;\n /** Default value represented as either a runtime value or a GraphQL literal. */\n default?: GraphQLDefaultInput | undefined;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason?: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLArgumentExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<InputValueDefinitionNode>;\n}\n\n/** @internal */\nexport interface GraphQLArgumentNormalizedConfig extends GraphQLArgumentConfig {\n default: GraphQLDefaultInput | undefined;\n extensions: Readonly<GraphQLArgumentExtensions>;\n}\n\n/**\n * A map of field names to field configuration objects.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n */\nexport type GraphQLFieldConfigMap<TSource, TContext> = ObjMap<\n GraphQLFieldConfig<TSource, TContext>\n>;\n\n/** @internal */\nexport type GraphQLFieldNormalizedConfigMap<TSource, TContext> = ObjMap<\n GraphQLFieldNormalizedConfig<TSource, TContext>\n>;\n\n/**\n * A resolved GraphQL field definition.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @typeParam TArgs - Argument object type passed to resolvers.\n */\nexport class GraphQLField<\n TSource = any,\n TContext = any,\n TArgs = any,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLField instances.\n * @private\n */\n readonly __kind: symbol;\n /** Object or interface type that owns this field, if known. */\n parentType:\n | GraphQLObjectType<TSource, TContext>\n | GraphQLInterfaceType<TSource, TContext>\n | undefined;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** The GraphQL type reference or runtime type for this element. */\n type: GraphQLOutputType;\n /** Arguments accepted by this field or directive. */\n args: ReadonlyArray<GraphQLArgument>;\n /** Resolver function used to produce this field value. */\n resolve?: GraphQLFieldResolver<TSource, TContext, TArgs> | undefined;\n /** Resolver function used to create a subscription event stream for this field. */\n subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs> | undefined;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<FieldDefinitionNode>;\n\n /**\n * Creates a resolved GraphQL field definition.\n * @param parentType - Object or interface type that owns this field, if known.\n * @param name - Field name.\n * @param config - Field configuration.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { parse, Kind } from 'graphql/language';\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const document = parse('type Query { greeting: String }');\n * assert(document.definitions[0].kind === Kind.OBJECT_TYPE_DEFINITION);\n * const fieldNode = document.definitions[0].fields?.[0];\n * const field = new GraphQLField(Query, 'greeting', {\n * description: 'Greeting text.',\n * type: GraphQLString,\n * args: {\n * name: { type: GraphQLString, default: { value: 'world' } },\n * },\n * resolve: (_source, { name }) => `Hello, ${name}!`,\n * subscribe: async function* () {\n * yield { greeting: 'Hello!' };\n * },\n * deprecationReason: 'Use hello.',\n * extensions: { cacheSeconds: 60 },\n * astNode: fieldNode,\n * });\n *\n * field.parentType; // => Query\n * field.name; // => 'greeting'\n * field.args[0].default?.value; // => 'world'\n * typeof field.subscribe; // => 'function'\n * field.deprecationReason; // => 'Use hello.'\n * field.astNode; // => fieldNode\n * ```\n */\n constructor(\n parentType:\n | GraphQLObjectType<TSource, TContext>\n | GraphQLInterfaceType<TSource, TContext>\n | undefined,\n name: string,\n config: GraphQLFieldConfig<TSource, TContext, TArgs>,\n ) {\n this.__kind = fieldSymbol;\n this.parentType = parentType;\n this.name = assertName(name);\n this.description = config.description;\n this.type = config.type;\n\n const argsConfig = config.args;\n this.args = argsConfig\n ? Object.entries(argsConfig).map(\n ([argName, argConfig]) =>\n new GraphQLArgument(this, argName, argConfig),\n )\n : [];\n\n this.resolve = config.resolve;\n this.subscribe = config.subscribe;\n this.deprecationReason = config.deprecationReason;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLField';\n }\n\n /**\n * Returns a normalized configuration object for this field.\n * @returns A configuration object that can be used to recreate this field.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', {\n * type: GraphQLString,\n * extensions: { cacheSeconds: 60 },\n * });\n *\n * field.toConfig().type; // => GraphQLString\n * field.toConfig().extensions; // => { cacheSeconds: 60 }\n * ```\n */\n toConfig(): GraphQLFieldNormalizedConfig<TSource, TContext, TArgs> {\n return {\n description: this.description,\n type: this.type,\n args: keyValMap(\n this.args,\n (arg) => arg.name,\n (arg) => arg.toConfig(),\n ),\n resolve: this.resolve,\n subscribe: this.subscribe,\n deprecationReason: this.deprecationReason,\n extensions: this.extensions,\n astNode: this.astNode,\n };\n }\n\n /**\n * Returns this field as a schema coordinate string.\n * @returns The field coordinate.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', { type: GraphQLString });\n *\n * field.toString(); // => 'Query.greeting'\n * ```\n */\n toString(): string {\n return `${this.parentType ?? '<meta>'}.${this.name}`;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The field coordinate.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', { type: GraphQLString });\n *\n * JSON.stringify(field); // => '\"Query.greeting\"'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/** A resolved GraphQL argument definition. */\nexport class GraphQLArgument implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLArgument instances.\n * @private\n */\n readonly __kind: symbol;\n /** Field or directive that owns this argument. */\n parent: GraphQLField | GraphQLDirective;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** The GraphQL type reference or runtime type for this element. */\n type: GraphQLInputType;\n /**\n * Deprecated legacy default value used when no explicit value is supplied.\n * Use `default` instead.\n * @deprecated use `default` instead, `defaultValue` will be removed in v18\n */\n defaultValue: unknown;\n /** Default value represented as either a runtime value or a GraphQL literal. */\n default: GraphQLDefaultInput | undefined;\n /**\n * Cached coerced default value.\n * @private\n */\n _memoizedCoercedDefaultValue: unknown;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLArgumentExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<InputValueDefinitionNode>;\n\n /**\n * Creates a resolved GraphQL argument definition.\n * @param parent - Field or directive that owns this argument.\n * @param name - Argument name.\n * @param config - Argument configuration.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLArgument, GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', { type: GraphQLString });\n * const arg = new GraphQLArgument(field, 'name', {\n * type: GraphQLString,\n * default: { value: 'world' },\n * });\n *\n * arg.parent; // => field\n * arg.name; // => 'name'\n * arg.default?.value; // => 'world'\n * ```\n */\n constructor(\n parent: GraphQLField | GraphQLDirective,\n name: string,\n config: GraphQLArgumentConfig,\n ) {\n this.__kind = argumentSymbol;\n this.parent = parent;\n this.name = assertName(name);\n this.description = config.description;\n this.type = config.type;\n this.defaultValue = config.defaultValue;\n this.default = config.default;\n this._memoizedCoercedDefaultValue = undefined;\n this.deprecationReason = config.deprecationReason;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLArgument';\n }\n\n /**\n * Returns a normalized configuration object for this argument.\n * @returns A configuration object that can be used to recreate this argument.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLArgument, GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', { type: GraphQLString });\n * const arg = new GraphQLArgument(field, 'name', {\n * type: GraphQLString,\n * default: { value: 'world' },\n * });\n *\n * arg.toConfig().default?.value; // => 'world'\n * ```\n */\n toConfig(): GraphQLArgumentNormalizedConfig {\n return {\n description: this.description,\n type: this.type,\n defaultValue: this.defaultValue,\n default: this.default,\n deprecationReason: this.deprecationReason,\n extensions: this.extensions,\n astNode: this.astNode,\n };\n }\n\n /**\n * Returns this argument as a schema coordinate string.\n * @returns The argument coordinate.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLArgument, GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', { type: GraphQLString });\n * const arg = new GraphQLArgument(field, 'name', { type: GraphQLString });\n *\n * arg.toString(); // => 'Query.greeting(name:)'\n * ```\n */\n toString(): string {\n return `${this.parent}(${this.name}:)`;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The argument coordinate.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLArgument, GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'greeting', { type: GraphQLString });\n * const arg = new GraphQLArgument(field, 'name', { type: GraphQLString });\n *\n * JSON.stringify(arg); // => '\"Query.greeting(name:)\"'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/**\n * Returns true when the argument is non-null and has no default value.\n * @param arg - The argument definition to inspect.\n * @returns True when the argument is non-null and has no default value.\n * @example\n * ```ts\n * import {\n * GraphQLInt,\n * GraphQLNonNull,\n * GraphQLObjectType,\n * GraphQLString,\n * isRequiredArgument,\n * } from 'graphql/type';\n * import { GraphQLArgument, GraphQLField } from 'graphql/type/definition';\n *\n * const Query = new GraphQLObjectType({ name: 'Query', fields: {} });\n * const field = new GraphQLField(Query, 'reviews', { type: GraphQLString });\n * const requiredArgument = new GraphQLArgument(field, 'id', {\n * type: new GraphQLNonNull(GraphQLInt),\n * });\n * const optionalArgument = new GraphQLArgument(field, 'name', {\n * type: GraphQLString,\n * });\n * const argumentWithDefault = new GraphQLArgument(field, 'limit', {\n * type: new GraphQLNonNull(GraphQLInt),\n * default: { value: 10 },\n * });\n *\n * isRequiredArgument(requiredArgument); // => true\n * isRequiredArgument(optionalArgument); // => false\n * isRequiredArgument(argumentWithDefault); // => false\n * ```\n */\nexport function isRequiredArgument(\n arg: GraphQLArgument | GraphQLVariableSignature,\n): boolean {\n return (\n isNonNullType(arg.type) &&\n arg.default === undefined &&\n arg.defaultValue === undefined\n );\n}\n\n/**\n * A map of field names to resolved field definitions.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n */\nexport type GraphQLFieldMap<TSource, TContext> = ObjMap<\n GraphQLField<TSource, TContext>\n>;\n\n/** Default input represented as either a runtime value or a GraphQL literal. */\nexport type GraphQLDefaultInput =\n | {\n /** Runtime default value. */\n value: unknown;\n /** GraphQL literal default value is not provided in this variant. */\n literal?: never;\n }\n | {\n /** GraphQL literal default value. */\n literal: ConstValueNode;\n /** Runtime default value is not provided in this variant. */\n value?: never;\n };\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLInterfaceTypeExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Interface Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Interface type\n * is used to describe what types are possible, what fields are in common across\n * all types, as well as a function to determine which type is actually used\n * when the field is resolved.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @example\n * ```ts\n * import { GraphQLInterfaceType, GraphQLString } from 'graphql';\n *\n * const EntityType = new GraphQLInterfaceType({\n * name: 'Entity',\n * fields: {\n * name: { type: GraphQLString },\n * },\n * });\n * ```\n */\nexport class GraphQLInterfaceType<\n TSource = any,\n TContext = any,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLInterfaceType instances.\n * @private\n */\n readonly __kind: symbol;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** Function that resolves the concrete object type for this abstract type. */\n resolveType: Maybe<GraphQLTypeResolver<TSource, TContext>>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLInterfaceTypeExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<InterfaceTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>;\n\n private _fields: ThunkObjMap<GraphQLField<TSource, TContext>>;\n private _interfaces: ThunkReadonlyArray<GraphQLInterfaceType>;\n\n /**\n * Creates a GraphQLInterfaceType instance.\n * @param config - Configuration describing this object.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { parse, Kind } from 'graphql/language';\n * import { GraphQLID, GraphQLInterfaceType, GraphQLNonNull } from 'graphql/type';\n *\n * const document = parse(`\n * interface Node {\n * id: ID!\n * }\n *\n * interface Resource implements Node {\n * id: ID!\n * }\n *\n * extend interface Resource {\n * url: String\n * }\n * `);\n * assert(document.definitions[1].kind === Kind.INTERFACE_TYPE_DEFINITION);\n * assert(document.definitions[2].kind === Kind.INTERFACE_TYPE_EXTENSION);\n *\n * const Node = new GraphQLInterfaceType({\n * name: 'Node',\n * fields: {\n * id: { type: new GraphQLNonNull(GraphQLID) },\n * },\n * });\n *\n * const Resource = new GraphQLInterfaceType({\n * name: 'Resource',\n * description: 'An addressable resource.',\n * interfaces: [Node],\n * fields: {\n * id: { type: new GraphQLNonNull(GraphQLID) },\n * },\n * resolveType: (value) => {\n * return typeof value === 'object' && value != null && 'url' in value\n * ? 'WebPage'\n * : undefined;\n * },\n * extensions: { abstract: true },\n * astNode: document.definitions[1],\n * extensionASTNodes: [document.definitions[2]],\n * });\n *\n * Resource.name; // => 'Resource'\n * Resource.getInterfaces(); // => [Node]\n * Object.keys(Resource.getFields()); // => ['id']\n * Resource.extensions; // => { abstract: true }\n * ```\n */\n constructor(config: Readonly<GraphQLInterfaceTypeConfig<TSource, TContext>>) {\n this.__kind = interfaceSymbol;\n this.name = assertName(config.name);\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes ?? [];\n this._fields = (defineFieldMap<TSource, TContext>).bind(\n undefined,\n this,\n config.fields,\n );\n this._interfaces = defineInterfaces.bind(undefined, config.interfaces);\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLInterfaceType';\n }\n\n /**\n * Returns the fields defined by this type.\n * @returns The fields keyed by field name.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInterfaceType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * node: Node\n * }\n * `);\n *\n * const Node = assertInterfaceType(schema.getType('Node'));\n * const fields = Node.getFields();\n *\n * Object.keys(fields); // => ['id']\n * String(fields.id.type); // => 'ID!'\n * ```\n */\n getFields(): GraphQLFieldMap<TSource, TContext> {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n return this._fields;\n }\n\n /**\n * Returns the interfaces implemented by this type.\n * @returns The implemented interfaces.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInterfaceType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Resource {\n * url: String!\n * }\n *\n * interface Image implements Resource {\n * url: String!\n * width: Int\n * }\n *\n * type Photo implements Resource & Image {\n * url: String!\n * width: Int\n * }\n *\n * type Query {\n * image: Image\n * }\n * `);\n *\n * const Image = assertInterfaceType(schema.getType('Image'));\n *\n * Image.getInterfaces().map((type) => type.name); // => ['Resource']\n * ```\n */\n getInterfaces(): ReadonlyArray<GraphQLInterfaceType> {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n return this._interfaces;\n }\n\n /**\n * Returns a normalized configuration object for this object.\n * @returns A configuration object that can be used to recreate this object.\n * @example\n * ```ts\n * import { GraphQLID, GraphQLInterfaceType, GraphQLNonNull } from 'graphql/type';\n *\n * const Node = new GraphQLInterfaceType({\n * name: 'Node',\n * fields: {\n * id: { type: new GraphQLNonNull(GraphQLID) },\n * },\n * });\n *\n * const config = Node.toConfig();\n * const NodeCopy = new GraphQLInterfaceType(config);\n *\n * String(config.fields.id.type); // => 'ID!'\n * String(NodeCopy.getFields().id.type); // => 'ID!'\n * ```\n */\n toConfig(): GraphQLInterfaceTypeNormalizedConfig<TSource, TContext> {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: mapValue(this.getFields(), (field) => field.toConfig()),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n /**\n * Returns the schema coordinate identifying this interface type.\n * @returns The schema coordinate for this interface type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInterfaceType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * interface Node {\n * id: ID!\n * }\n *\n * type User implements Node {\n * id: ID!\n * }\n *\n * type Query {\n * node: Node\n * }\n * `);\n *\n * const Node = assertInterfaceType(schema.getType('Node'));\n *\n * Node.toString(); // => 'Node'\n * ```\n */\n toString(): string {\n return this.name;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLInterfaceType, GraphQLString } from 'graphql/type';\n *\n * const Named = new GraphQLInterfaceType({\n * name: 'Named',\n * fields: { name: { type: GraphQLString } },\n * });\n *\n * Named.toJSON(); // => 'Named'\n * JSON.stringify({ type: Named }); // => '{\"type\":\"Named\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/**\n * Configuration used to construct a GraphQLInterfaceType.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n */\nexport interface GraphQLInterfaceTypeConfig<TSource, TContext> {\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** Interfaces implemented by this object or interface type. */\n interfaces?: ThunkReadonlyArray<GraphQLInterfaceType> | undefined;\n /** Fields declared by this object, interface, input object, or literal. */\n fields: ThunkObjMap<GraphQLFieldConfig<TSource, TContext>>;\n /**\n * Optionally provide a custom type resolver function. If one is not provided,\n * the default implementation will call `isTypeOf` on each implementing\n * Object type.\n */\n resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<InterfaceTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes?: Maybe<ReadonlyArray<InterfaceTypeExtensionNode>>;\n}\n\n/** @internal */\nexport interface GraphQLInterfaceTypeNormalizedConfig<\n TSource,\n TContext,\n> extends GraphQLInterfaceTypeConfig<TSource, TContext> {\n interfaces: ReadonlyArray<GraphQLInterfaceType>;\n fields: GraphQLFieldNormalizedConfigMap<TSource, TContext>;\n extensions: Readonly<GraphQLInterfaceTypeExtensions>;\n extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>;\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLUnionTypeExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Union Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Union type\n * is used to describe what types are possible as well as providing a function\n * to determine which type is actually used when the field is resolved.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n * @example\n * ```ts\n * import { GraphQLObjectType, GraphQLString, GraphQLUnionType } from 'graphql';\n *\n * class Dog {}\n * class Cat {}\n * const DogType = new GraphQLObjectType({\n * name: 'Dog',\n * fields: { name: { type: GraphQLString } },\n * });\n * const CatType = new GraphQLObjectType({\n * name: 'Cat',\n * fields: { name: { type: GraphQLString } },\n * });\n *\n * const PetType = new GraphQLUnionType({\n * name: 'Pet',\n * types: [DogType, CatType],\n * resolveType: (value) => {\n * if (value instanceof Dog) {\n * return 'Dog';\n * }\n * if (value instanceof Cat) {\n * return 'Cat';\n * }\n * },\n * });\n * ```\n */\nexport class GraphQLUnionType<\n TSource = any,\n TContext = any,\n> implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLUnionType instances.\n * @private\n */\n readonly __kind: symbol;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** Function that resolves the concrete object type for this abstract type. */\n resolveType: Maybe<GraphQLTypeResolver<TSource, TContext>>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLUnionTypeExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<UnionTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes: ReadonlyArray<UnionTypeExtensionNode>;\n\n private _types: ThunkReadonlyArray<GraphQLObjectType>;\n\n /**\n * Creates a GraphQLUnionType instance.\n * @param config - Configuration describing this object.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { parse, Kind } from 'graphql/language';\n * import {\n * GraphQLObjectType,\n * GraphQLString,\n * GraphQLUnionType,\n * } from 'graphql/type';\n *\n * const document = parse(`\n * union Media = Photo | Video\n *\n * extend union Media = Audio\n * `);\n * assert(document.definitions[0].kind === Kind.UNION_TYPE_DEFINITION);\n * assert(document.definitions[1].kind === Kind.UNION_TYPE_EXTENSION);\n *\n * const Photo = new GraphQLObjectType({\n * name: 'Photo',\n * fields: { url: { type: GraphQLString } },\n * });\n * const Video = new GraphQLObjectType({\n * name: 'Video',\n * fields: { url: { type: GraphQLString } },\n * });\n *\n * const Media = new GraphQLUnionType({\n * name: 'Media',\n * description: 'Media that can appear in a search result.',\n * types: [Photo, Video],\n * resolveType: (value) => {\n * return typeof value === 'object' && value != null && 'duration' in value\n * ? 'Video'\n * : 'Photo';\n * },\n * extensions: { searchable: true },\n * astNode: document.definitions[0],\n * extensionASTNodes: [document.definitions[1]],\n * });\n *\n * Media.description; // => 'Media that can appear in a search result.'\n * Media.getTypes().map((type) => type.name); // => ['Photo', 'Video']\n * Media.extensions; // => { searchable: true }\n * ```\n */\n constructor(config: Readonly<GraphQLUnionTypeConfig<TSource, TContext>>) {\n this.__kind = unionSymbol;\n this.name = assertName(config.name);\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes ?? [];\n\n this._types = defineTypes.bind(undefined, config.types);\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLUnionType';\n }\n\n /**\n * Returns the object types included in this union.\n * @returns The union member object types.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertUnionType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Photo {\n * url: String!\n * }\n *\n * type Video {\n * url: String!\n * }\n *\n * union Media = Photo | Video\n *\n * type Query {\n * media: [Media]\n * }\n * `);\n *\n * const Media = assertUnionType(schema.getType('Media'));\n *\n * Media.getTypes().map((type) => type.name); // => ['Photo', 'Video']\n * ```\n */\n getTypes(): ReadonlyArray<GraphQLObjectType> {\n if (typeof this._types === 'function') {\n this._types = this._types();\n }\n return this._types;\n }\n\n /**\n * Returns a normalized configuration object for this object.\n * @returns A configuration object that can be used to recreate this object.\n * @example\n * ```ts\n * import {\n * GraphQLObjectType,\n * GraphQLString,\n * GraphQLUnionType,\n * } from 'graphql/type';\n *\n * const Photo = new GraphQLObjectType({\n * name: 'Photo',\n * fields: { url: { type: GraphQLString } },\n * });\n * const Video = new GraphQLObjectType({\n * name: 'Video',\n * fields: { url: { type: GraphQLString } },\n * });\n * const Media = new GraphQLUnionType({\n * name: 'Media',\n * types: [Photo, Video],\n * });\n *\n * const config = Media.toConfig();\n * const MediaCopy = new GraphQLUnionType(config);\n *\n * MediaCopy.getTypes().map((type) => type.name); // => ['Photo', 'Video']\n * ```\n */\n toConfig(): GraphQLUnionTypeNormalizedConfig<TSource, TContext> {\n return {\n name: this.name,\n description: this.description,\n types: this.getTypes(),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n /**\n * Returns the schema coordinate identifying this union type.\n * @returns The schema coordinate for this union type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertUnionType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * type Photo {\n * url: String!\n * }\n *\n * union SearchResult = Photo\n *\n * type Query {\n * search: [SearchResult]\n * }\n * `);\n *\n * const SearchResult = assertUnionType(schema.getType('SearchResult'));\n *\n * SearchResult.toString(); // => 'SearchResult'\n * ```\n */\n toString(): string {\n return this.name;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import {\n * GraphQLObjectType,\n * GraphQLString,\n * GraphQLUnionType,\n * } from 'graphql/type';\n *\n * const Photo = new GraphQLObjectType({\n * name: 'Photo',\n * fields: { url: { type: GraphQLString } },\n * });\n * const SearchResult = new GraphQLUnionType({\n * name: 'SearchResult',\n * types: [Photo],\n * });\n *\n * SearchResult.toJSON(); // => 'SearchResult'\n * JSON.stringify({ type: SearchResult }); // => '{\"type\":\"SearchResult\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\nfunction defineTypes(\n types: ThunkReadonlyArray<GraphQLObjectType>,\n): ReadonlyArray<GraphQLObjectType> {\n return resolveReadonlyArrayThunk(types);\n}\n\n/**\n * Configuration used to construct a GraphQLUnionType.\n * @typeParam TSource - Source object type passed to resolvers.\n * @typeParam TContext - Context object type passed to resolvers.\n */\nexport interface GraphQLUnionTypeConfig<TSource, TContext> {\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** Object types that belong to this union type. */\n types: ThunkReadonlyArray<GraphQLObjectType>;\n /**\n * Optionally provide a custom type resolver function. If one is not provided,\n * the default implementation will call `isTypeOf` on each implementing\n * Object type.\n */\n resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLUnionTypeExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<UnionTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes?: Maybe<ReadonlyArray<UnionTypeExtensionNode>>;\n}\n\n/** @internal */\nexport interface GraphQLUnionTypeNormalizedConfig<\n TSource,\n TContext,\n> extends GraphQLUnionTypeConfig<TSource, TContext> {\n types: ReadonlyArray<GraphQLObjectType>;\n extensions: Readonly<GraphQLUnionTypeExtensions>;\n extensionASTNodes: ReadonlyArray<UnionTypeExtensionNode>;\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLEnumTypeExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Enum Type Definition\n *\n * Enum types define leaf values whose serialized form is one of a fixed set\n * of GraphQL enum names. Internally, enum values can map to any runtime value,\n * often integers.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGBType = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGBType.getValue('GREEN')?.value; // => 1\n * ```\n *\n * Note: If a value is not provided in a definition, the name of the enum value\n * will be used as its internal value.\n */\nexport class GraphQLEnumType /* <T> */ implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLEnumType instances.\n * @private\n */\n readonly __kind: symbol;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLEnumTypeExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<EnumTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes: ReadonlyArray<EnumTypeExtensionNode>;\n\n private _values:\n | ReadonlyArray<GraphQLEnumValue /* <T> */>\n | (() => ReadonlyArray<GraphQLEnumValue>) /* <T> */;\n\n private _valueLookup: ReadonlyMap<any /* T */, GraphQLEnumValue> | null;\n private _nameLookup: ObjMap<GraphQLEnumValue> | null;\n\n /**\n * Creates a GraphQLEnumType instance.\n * @param config - Configuration describing this object.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { parse, Kind } from 'graphql/language';\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const document = parse(`\n * enum Episode {\n * NEW_HOPE\n * EMPIRE\n * JEDI\n * }\n *\n * extend enum Episode {\n * FORCE_AWAKENS\n * }\n * `);\n * assert(document.definitions[0].kind === Kind.ENUM_TYPE_DEFINITION);\n * assert(document.definitions[1].kind === Kind.ENUM_TYPE_EXTENSION);\n * const definition = document.definitions[0];\n *\n * const Episode = new GraphQLEnumType({\n * name: 'Episode',\n * description: 'A Star Wars film episode.',\n * values: {\n * NEW_HOPE: {\n * value: 4,\n * description: 'Released in 1977.',\n * extensions: { trilogy: 'original' },\n * astNode: definition.values?.[0],\n * },\n * EMPIRE: { value: 5, astNode: definition.values?.[1] },\n * JEDI: {\n * value: 6,\n * deprecationReason: 'Use RETURN_OF_THE_JEDI.',\n * astNode: definition.values?.[2],\n * },\n * },\n * extensions: { catalog: 'films' },\n * astNode: definition,\n * extensionASTNodes: [document.definitions[1]],\n * });\n *\n * Episode.description; // => 'A Star Wars film episode.'\n * Episode.coerceOutputValue(5); // => 'EMPIRE'\n * Episode.coerceInputValue('JEDI'); // => 6\n * Episode.getValue('JEDI')?.deprecationReason; // => 'Use RETURN_OF_THE_JEDI.'\n * Episode.extensions; // => { catalog: 'films' }\n * ```\n */\n constructor(config: Readonly<GraphQLEnumTypeConfig /* <T> */>) {\n this.__kind = enumSymbol;\n this.name = assertName(config.name);\n this.description = config.description;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes ?? [];\n\n this._values = defineEnumValues.bind(undefined, this, config.values);\n this._valueLookup = null;\n this._nameLookup = null;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLEnumType';\n }\n\n /**\n * Returns the values defined by this enum type.\n * @returns Enum value definitions in schema order.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertEnumType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * EMPIRE\n * JEDI\n * }\n *\n * type Query {\n * episode: Episode\n * }\n * `);\n *\n * const Episode = assertEnumType(schema.getType('Episode'));\n *\n * Episode.getValues().map((value) => value.name); // => ['NEW_HOPE', 'EMPIRE', 'JEDI']\n * ```\n */\n getValues(): ReadonlyArray<GraphQLEnumValue /* <T> */> {\n if (typeof this._values === 'function') {\n this._values = this._values();\n }\n return this._values;\n }\n\n /**\n * Returns the enum value definition for a value name.\n * @param name - The GraphQL name to look up.\n * @returns The matching enum value definition, if it exists.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertEnumType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * EMPIRE\n * }\n *\n * type Query {\n * episode: Episode\n * }\n * `);\n *\n * const Episode = assertEnumType(schema.getType('Episode'));\n *\n * Episode.getValue('EMPIRE')?.name; // => 'EMPIRE'\n * Episode.getValue('JEDI'); // => undefined\n * ```\n */\n getValue(name: string): Maybe<GraphQLEnumValue> {\n this._nameLookup ??= keyMap(this.getValues(), (value) => value.name);\n return this._nameLookup[name];\n }\n\n /**\n * Serializes a runtime enum value as a GraphQL enum name.\n * @param outputValue - Runtime enum value to serialize.\n * @returns The GraphQL enum name for the runtime value.\n *\n * This deprecated method delegates to `coerceOutputValue()`; call\n * `coerceOutputValue()` directly instead.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGB.serialize(1); // => 'GREEN'\n * RGB.serialize(3); // throws an error\n * ```\n * @deprecated use `coerceOutputValue()` instead, `serialize()` will be removed in v18\n */\n serialize(outputValue: unknown /* T */): Maybe<string> {\n return this.coerceOutputValue(outputValue);\n }\n\n /**\n * Coerces a runtime enum value to a GraphQL enum name.\n * @param outputValue - Runtime enum value to coerce.\n * @returns The GraphQL enum name for the runtime value.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGB.coerceOutputValue(1); // => 'GREEN'\n * RGB.coerceOutputValue(3); // throws an error\n * ```\n */\n coerceOutputValue(outputValue: unknown /* T */): Maybe<string> {\n this._valueLookup ??= new Map(\n this.getValues().map((enumValue) => [enumValue.value, enumValue]),\n );\n const enumValue = this._valueLookup.get(outputValue);\n if (enumValue === undefined) {\n throw new GraphQLError(\n `Enum \"${this.name}\" cannot represent value: ${inspect(outputValue)}`,\n );\n }\n return enumValue.name;\n }\n\n /**\n * Deprecated legacy enum parser for externally provided input values. Use\n * `coerceInputValue()` instead.\n * @param inputValue - External enum name to parse.\n * @param hideSuggestions - Whether suggestion text should be omitted from errors.\n * @returns The internal runtime value for the enum name.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGB.parseValue('BLUE'); // => 2\n * RGB.parseValue('PURPLE', true); // throws an error\n * ```\n * @deprecated use `coerceInputValue()` instead, `parseValue()` will be removed in v18\n */\n parseValue(\n inputValue: unknown,\n hideSuggestions?: Maybe<boolean>,\n ): Maybe<any> /* T */ {\n return this.coerceInputValue(inputValue, hideSuggestions);\n }\n\n /**\n * Coerces an external enum name to its internal runtime value.\n * @param inputValue - External enum name to coerce.\n * @param hideSuggestions - Whether suggestion text should be omitted from errors.\n * @returns The internal runtime value for the enum name.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGB.coerceInputValue('BLUE'); // => 2\n * RGB.coerceInputValue('PURPLE'); // throws an error\n * RGB.coerceInputValue(2); // throws an error\n * ```\n */\n coerceInputValue(\n inputValue: unknown,\n hideSuggestions?: Maybe<boolean>,\n ): Maybe<any> /* T */ {\n if (typeof inputValue !== 'string') {\n const valueStr = inspect(inputValue);\n throw new GraphQLError(\n `Enum \"${this.name}\" cannot represent non-string value: ${valueStr}.` +\n (hideSuggestions ? '' : didYouMeanEnumValue(this, valueStr)),\n );\n }\n\n const enumValue = this.getValue(inputValue);\n if (enumValue == null) {\n throw new GraphQLError(\n `Value \"${inputValue}\" does not exist in \"${this.name}\" enum.` +\n (hideSuggestions ? '' : didYouMeanEnumValue(this, inputValue)),\n );\n }\n return enumValue.value;\n }\n\n /**\n * Deprecated legacy enum parser for externally provided input literals. Use\n * `coerceInputLiteral()` instead.\n * @param valueNode - Enum value AST node to parse.\n * @param _variables - Deprecated variable values parameter that is no longer used.\n * @param hideSuggestions - Whether suggestion text should be omitted from errors.\n * @returns The internal runtime value for the enum literal.\n * @example\n * ```ts\n * import { parseValue } from 'graphql/language';\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGB.parseLiteral(parseValue('RED'), undefined); // => 0\n * RGB.parseLiteral(parseValue('\"RED\"'), undefined); // throws an error\n * ```\n * @deprecated use `coerceInputLiteral()` instead, `parseLiteral()` will be removed in v18\n */\n parseLiteral(\n valueNode: ValueNode,\n _variables: Maybe<ObjMap<unknown>>,\n hideSuggestions?: Maybe<boolean>,\n ): Maybe<any> /* T */ {\n // Note: variables will be resolved to a value before calling this function.\n return this.coerceInputLiteral(\n valueNode as ConstValueNode,\n hideSuggestions,\n );\n }\n\n /**\n * Coerces an enum value AST node to its internal runtime value.\n * @param valueNode - Enum value AST node to coerce.\n * @param hideSuggestions - Whether suggestion text should be omitted from errors.\n * @returns The internal runtime value for the enum literal.\n * @example\n * ```ts\n * import { parseConstValue } from 'graphql/language';\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * RGB.coerceInputLiteral(parseConstValue('RED')); // => 0\n * RGB.coerceInputLiteral(parseConstValue('\"RED\"'), true); // throws an error\n * ```\n */\n coerceInputLiteral(\n valueNode: ConstValueNode,\n hideSuggestions?: Maybe<boolean>,\n ): Maybe<any> /* T */ {\n if (valueNode.kind !== Kind.ENUM) {\n const valueStr = print(valueNode);\n throw new GraphQLError(\n `Enum \"${this.name}\" cannot represent non-enum value: ${valueStr}.` +\n (hideSuggestions ? '' : didYouMeanEnumValue(this, valueStr)),\n { nodes: valueNode },\n );\n }\n\n const enumValue = this.getValue(valueNode.value);\n if (enumValue == null) {\n const valueStr = print(valueNode);\n throw new GraphQLError(\n `Value \"${valueStr}\" does not exist in \"${this.name}\" enum.` +\n (hideSuggestions ? '' : didYouMeanEnumValue(this, valueStr)),\n { nodes: valueNode },\n );\n }\n return enumValue.value;\n }\n\n /**\n * Converts an external enum value name to a GraphQL enum value AST node.\n * @param value - External enum value name to convert.\n * @returns Enum value AST node, or undefined if the value is invalid.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { print } from 'graphql/language';\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * const literal = RGB.valueToLiteral('BLUE');\n * assert(literal);\n * print(literal); // => 'BLUE'\n * RGB.valueToLiteral(2); // => undefined\n * RGB.valueToLiteral('PURPLE'); // => undefined\n * ```\n */\n valueToLiteral(value: unknown): ConstValueNode | undefined {\n if (typeof value === 'string' && this.getValue(value)) {\n return { kind: Kind.ENUM, value };\n }\n }\n\n /**\n * Returns a normalized configuration object for this object.\n * @returns A configuration object that can be used to recreate this object.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const RGB = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 },\n * },\n * });\n *\n * const config = RGB.toConfig();\n * const RGBCopy = new GraphQLEnumType(config);\n *\n * config.values.GREEN.value; // => 1\n * RGBCopy.coerceOutputValue(2); // => 'BLUE'\n * ```\n */\n toConfig(): GraphQLEnumTypeNormalizedConfig {\n return {\n name: this.name,\n description: this.description,\n values: keyValMap(\n this.getValues(),\n (value) => value.name,\n (value) => value.toConfig(),\n ),\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n /**\n * Returns the schema coordinate identifying this enum type.\n * @returns The schema coordinate for this enum type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertEnumType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * enum Episode {\n * NEW_HOPE\n * }\n *\n * type Query {\n * episode: Episode\n * }\n * `);\n *\n * const Episode = assertEnumType(schema.getType('Episode'));\n *\n * Episode.toString(); // => 'Episode'\n * ```\n */\n toString(): string {\n return this.name;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n *\n * const Episode = new GraphQLEnumType({\n * name: 'Episode',\n * values: {\n * NEW_HOPE: {},\n * },\n * });\n *\n * Episode.toJSON(); // => 'Episode'\n * JSON.stringify({ type: Episode }); // => '{\"type\":\"Episode\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\nfunction defineEnumValues(\n parentEnum: GraphQLEnumType,\n values: ThunkObjMap<GraphQLEnumValueConfig /* <T> */>,\n): ReadonlyArray<GraphQLEnumValue> {\n const valueMap = resolveObjMapThunk(values);\n\n return Object.entries(valueMap).map(\n ([valueName, valueConfig]) =>\n new GraphQLEnumValue(parentEnum, valueName, valueConfig),\n );\n}\n\nfunction didYouMeanEnumValue(\n enumType: GraphQLEnumType,\n unknownValueStr: string,\n): string {\n const allNames = enumType.getValues().map((value) => value.name);\n const suggestedValues = suggestionList(unknownValueStr, allNames);\n\n return didYouMean('the enum value', suggestedValues);\n}\n\n/** Configuration used to construct a GraphQLEnumType. */\nexport interface GraphQLEnumTypeConfig {\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** Values contained in this enum, list, or input-object definition. */\n values: ThunkObjMap<GraphQLEnumValueConfig /* <T> */>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLEnumTypeExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<EnumTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes?: Maybe<ReadonlyArray<EnumTypeExtensionNode>>;\n}\n\n/** @internal */\nexport interface GraphQLEnumTypeNormalizedConfig extends GraphQLEnumTypeConfig {\n values: GraphQLEnumValueNormalizedConfigMap;\n extensions: Readonly<GraphQLEnumTypeExtensions>;\n extensionASTNodes: ReadonlyArray<EnumTypeExtensionNode>;\n}\n\n/** A map of enum value names to enum value configuration objects. */\nexport type GraphQLEnumValueConfigMap /* <T> */ =\n ObjMap<GraphQLEnumValueConfig /* <T> */>;\n\n/** @internal */\nexport type GraphQLEnumValueNormalizedConfigMap /* <T> */ =\n ObjMap<GraphQLEnumValueNormalizedConfig /* <T> */>;\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLEnumValueExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/** Configuration used to define a GraphQL enum value. */\nexport interface GraphQLEnumValueConfig {\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** Parsed value represented by this node. */\n value?: any /* T */;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason?: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLEnumValueExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<EnumValueDefinitionNode>;\n}\n\n/** @internal */\nexport interface GraphQLEnumValueNormalizedConfig extends GraphQLEnumValueConfig {\n extensions: Readonly<GraphQLEnumValueExtensions>;\n}\n\n/** A resolved GraphQL enum value definition. */\nexport class GraphQLEnumValue implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLEnumValue instances.\n * @private\n */\n readonly __kind: symbol;\n /** Enum type that owns this enum value. */\n parentEnum: GraphQLEnumType;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** Parsed value represented by this node. */\n value: any /* T */;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLEnumValueExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<EnumValueDefinitionNode>;\n\n /**\n * Creates a resolved GraphQL enum value definition.\n * @param parentEnum - Enum type that owns this enum value.\n * @param name - Enum value name.\n * @param config - Enum value configuration.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n * import { GraphQLEnumValue } from 'graphql/type/definition';\n *\n * const Episode = new GraphQLEnumType({\n * name: 'Episode',\n * values: { NEW_HOPE: { value: 4 } },\n * });\n * const enumValue = new GraphQLEnumValue(Episode, 'EMPIRE', {\n * value: 5,\n * description: 'Released in 1980.',\n * });\n *\n * enumValue.parentEnum; // => Episode\n * enumValue.name; // => 'EMPIRE'\n * enumValue.value; // => 5\n * ```\n */\n constructor(\n parentEnum: GraphQLEnumType,\n name: string,\n config: GraphQLEnumValueConfig,\n ) {\n this.__kind = enumValueSymbol;\n this.parentEnum = parentEnum;\n this.name = assertEnumValueName(name);\n this.description = config.description;\n this.value = config.value !== undefined ? config.value : name;\n this.deprecationReason = config.deprecationReason;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLEnumValue';\n }\n\n /**\n * Returns a normalized configuration object for this enum value.\n * @returns A configuration object that can be used to recreate this enum value.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n * import { GraphQLEnumValue } from 'graphql/type/definition';\n *\n * const Episode = new GraphQLEnumType({\n * name: 'Episode',\n * values: { NEW_HOPE: { value: 4 } },\n * });\n * const enumValue = new GraphQLEnumValue(Episode, 'EMPIRE', {\n * value: 5,\n * extensions: { trilogy: 'original' },\n * });\n *\n * enumValue.toConfig(); // => { description: undefined, value: 5, deprecationReason: undefined, extensions: { trilogy: 'original' }, astNode: undefined }\n * ```\n */\n toConfig(): GraphQLEnumValueNormalizedConfig {\n return {\n description: this.description,\n value: this.value,\n deprecationReason: this.deprecationReason,\n extensions: this.extensions,\n astNode: this.astNode,\n };\n }\n\n /**\n * Returns this enum value as a schema coordinate string.\n * @returns Enum value coordinate.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n * import { GraphQLEnumValue } from 'graphql/type/definition';\n *\n * const Episode = new GraphQLEnumType({\n * name: 'Episode',\n * values: { NEW_HOPE: { value: 4 } },\n * });\n * const enumValue = new GraphQLEnumValue(Episode, 'EMPIRE', { value: 5 });\n *\n * enumValue.toString(); // => 'Episode.EMPIRE'\n * ```\n */\n toString(): string {\n return `${this.parentEnum.name}.${this.name}`;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns Enum value coordinate.\n * @example\n * ```ts\n * import { GraphQLEnumType } from 'graphql/type';\n * import { GraphQLEnumValue } from 'graphql/type/definition';\n *\n * const Episode = new GraphQLEnumType({\n * name: 'Episode',\n * values: { NEW_HOPE: { value: 4 } },\n * });\n * const enumValue = new GraphQLEnumValue(Episode, 'EMPIRE', { value: 5 });\n *\n * JSON.stringify(enumValue); // => '\"Episode.EMPIRE\"'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLInputObjectTypeExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/**\n * Input Object Type Definition\n *\n * An input object defines a structured collection of fields which may be\n * supplied to a field argument.\n *\n * Using `NonNull` will ensure that a value must be provided by the query\n * @example\n * ```ts\n * import { GraphQLFloat, GraphQLInputObjectType, GraphQLNonNull } from 'graphql';\n *\n * const GeoPoint = new GraphQLInputObjectType({\n * name: 'GeoPoint',\n * fields: {\n * lat: { type: new GraphQLNonNull(GraphQLFloat) },\n * lon: { type: new GraphQLNonNull(GraphQLFloat) },\n * alt: { type: GraphQLFloat, default: { value: 0 } },\n * },\n * });\n * ```\n */\nexport class GraphQLInputObjectType implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLInputObjectType instances.\n * @private\n */\n readonly __kind: symbol;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLInputObjectTypeExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<InputObjectTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>;\n /** Whether this input object uses the experimental OneOf input object semantics. */\n isOneOf: boolean;\n\n private _fields: ThunkObjMap<GraphQLInputField>;\n\n /**\n * Creates a GraphQLInputObjectType instance.\n * @param config - Configuration describing this object.\n * @example\n * ```ts\n * import assert from 'node:assert/strict';\n * import { parse, Kind } from 'graphql/language';\n * import {\n * GraphQLID,\n * GraphQLInputObjectType,\n * GraphQLInt,\n * GraphQLNonNull,\n * GraphQLString,\n * } from 'graphql/type';\n *\n * const document = parse(`\n * input ReviewInput {\n * stars: Int!\n * commentary: String\n * }\n *\n * extend input ReviewInput {\n * body: String\n * }\n * `);\n * assert(document.definitions[0].kind === Kind.INPUT_OBJECT_TYPE_DEFINITION);\n * assert(document.definitions[1].kind === Kind.INPUT_OBJECT_TYPE_EXTENSION);\n * const definition = document.definitions[0];\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * description: 'Input collected when reviewing a product.',\n * fields: {\n * stars: {\n * description: 'Star rating from one to five.',\n * type: new GraphQLNonNull(GraphQLInt),\n * extensions: { min: 1, max: 5 },\n * astNode: definition.fields?.[0],\n * },\n * commentary: {\n * type: GraphQLString,\n * default: { value: '' },\n * deprecationReason: 'Use body.',\n * astNode: definition.fields?.[1],\n * },\n * },\n * extensions: { form: 'review' },\n * astNode: definition,\n * extensionASTNodes: [document.definitions[1]],\n * isOneOf: false,\n * });\n * const SearchBy = new GraphQLInputObjectType({\n * name: 'SearchBy',\n * fields: {\n * id: { type: GraphQLID },\n * slug: { type: GraphQLString },\n * },\n * isOneOf: true,\n * });\n *\n * const fields = ReviewInput.getFields();\n *\n * ReviewInput.description; // => 'Input collected when reviewing a product.'\n * String(fields.stars.type); // => 'Int!'\n * fields.stars.extensions; // => { min: 1, max: 5 }\n * fields.commentary.default?.value; // => ''\n * fields.commentary.deprecationReason; // => 'Use body.'\n * ReviewInput.isOneOf; // => false\n * SearchBy.isOneOf; // => true\n * ```\n */\n constructor(config: Readonly<GraphQLInputObjectTypeConfig>) {\n this.__kind = inputObjectSymbol;\n this.name = assertName(config.name);\n this.description = config.description;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes ?? [];\n this.isOneOf = config.isOneOf ?? false;\n\n this._fields = defineInputFieldMap.bind(undefined, this, config.fields);\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLInputObjectType';\n }\n\n /**\n * Returns the fields defined by this type.\n * @returns The fields keyed by field name.\n * @example\n * ```ts\n * import { Kind } from 'graphql/language';\n * import assert from 'node:assert/strict';\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInputObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * commentary: String = \"\"\n * }\n *\n * type Query {\n * reviews(filter: ReviewInput): [String]\n * }\n * `);\n *\n * const ReviewInput = assertInputObjectType(schema.getType('ReviewInput'));\n * const fields = ReviewInput.getFields();\n *\n * Object.keys(fields); // => ['stars', 'commentary']\n * const literal = fields.commentary.default?.literal;\n * assert(literal?.kind === Kind.STRING);\n * literal.value; // => ''\n * ```\n */\n getFields(): GraphQLInputFieldMap {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n return this._fields;\n }\n\n /**\n * Returns a normalized configuration object for this object.\n * @returns A configuration object that can be used to recreate this object.\n * @example\n * ```ts\n * import {\n * GraphQLInputObjectType,\n * GraphQLInt,\n * GraphQLNonNull,\n * } from 'graphql/type';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {\n * stars: { type: new GraphQLNonNull(GraphQLInt) },\n * },\n * });\n *\n * const config = ReviewInput.toConfig();\n * const ReviewInputCopy = new GraphQLInputObjectType(config);\n *\n * String(config.fields.stars.type); // => 'Int!'\n * String(ReviewInputCopy.getFields().stars.type); // => 'Int!'\n * ```\n */\n toConfig(): GraphQLInputObjectTypeNormalizedConfig {\n return {\n name: this.name,\n description: this.description,\n fields: mapValue(this.getFields(), (field) => field.toConfig()),\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n isOneOf: this.isOneOf,\n };\n }\n\n /**\n * Returns the schema coordinate identifying this input object type.\n * @returns The schema coordinate for this input object type.\n * @example\n * ```ts\n * import { buildSchema } from 'graphql/utilities';\n * import { assertInputObjectType } from 'graphql/type';\n *\n * const schema = buildSchema(`\n * input ReviewInput {\n * stars: Int!\n * }\n *\n * type Query {\n * reviews(filter: ReviewInput): [String]\n * }\n * `);\n *\n * const ReviewInput = assertInputObjectType(schema.getType('ReviewInput'));\n *\n * ReviewInput.toString(); // => 'ReviewInput'\n * ```\n */\n toString(): string {\n return this.name;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLInputObjectType, GraphQLString } from 'graphql/type';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {\n * commentary: { type: GraphQLString },\n * },\n * });\n *\n * ReviewInput.toJSON(); // => 'ReviewInput'\n * JSON.stringify({ type: ReviewInput }); // => '{\"type\":\"ReviewInput\"}'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\nfunction defineInputFieldMap(\n parentType: GraphQLInputObjectType,\n fields: ThunkObjMap<GraphQLInputFieldConfig>,\n): GraphQLInputFieldMap {\n const fieldMap = resolveObjMapThunk(fields);\n return mapValue(\n fieldMap,\n (fieldConfig, fieldName) =>\n new GraphQLInputField(parentType, fieldName, fieldConfig),\n );\n}\n\n/** Configuration used to construct a GraphQLInputObjectType. */\nexport interface GraphQLInputObjectTypeConfig {\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** Fields declared by this object, interface, input object, or literal. */\n fields: ThunkObjMap<GraphQLInputFieldConfig>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<InputObjectTypeDefinitionNode>;\n /** AST extension nodes applied to this schema element. */\n extensionASTNodes?: Maybe<ReadonlyArray<InputObjectTypeExtensionNode>>;\n /** Whether this input object uses the experimental OneOf input object semantics. */\n isOneOf?: boolean;\n}\n\n/** @internal */\nexport interface GraphQLInputObjectTypeNormalizedConfig extends GraphQLInputObjectTypeConfig {\n fields: GraphQLInputFieldNormalizedConfigMap;\n extensions: Readonly<GraphQLInputObjectTypeExtensions>;\n extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>;\n}\n\n/**\n * Custom extensions\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\nexport interface GraphQLInputFieldExtensions {\n [attributeName: string | symbol]: unknown;\n}\n\n/** Configuration used to define a GraphQL input field. */\nexport interface GraphQLInputFieldConfig {\n /** Human-readable description for this schema element, if provided. */\n description?: Maybe<string>;\n /** The GraphQL type reference or runtime type for this element. */\n type: GraphQLInputType;\n /**\n * Deprecated legacy default value for this input field. Use `default`\n * instead.\n * @deprecated use `default` instead, `defaultValue` will be removed in v18\n */\n defaultValue?: unknown;\n /** Default value represented as either a runtime value or a GraphQL literal. */\n default?: GraphQLDefaultInput | undefined;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason?: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions?: Maybe<Readonly<GraphQLInputFieldExtensions>>;\n /** AST node from which this schema element was built, if available. */\n astNode?: Maybe<InputValueDefinitionNode>;\n}\n\n/** A map of input field names to input field configuration objects. */\nexport type GraphQLInputFieldConfigMap = ObjMap<GraphQLInputFieldConfig>;\n\n/** @internal */\nexport interface GraphQLInputFieldNormalizedConfig extends GraphQLInputFieldConfig {\n default: GraphQLDefaultInput | undefined;\n extensions: Readonly<GraphQLInputFieldExtensions>;\n}\n\n/** @internal */\nexport type GraphQLInputFieldNormalizedConfigMap =\n ObjMap<GraphQLInputFieldNormalizedConfig>;\n\n/** A resolved GraphQL input field definition. */\nexport class GraphQLInputField implements GraphQLSchemaElement {\n /**\n * Internal runtime marker used to identify GraphQLInputField instances.\n * @private\n */\n readonly __kind: symbol;\n /** Input object type that owns this input field. */\n parentType: GraphQLInputObjectType;\n /** The GraphQL name for this schema element. */\n name: string;\n /** Human-readable description for this schema element, if provided. */\n description: Maybe<string>;\n /** The GraphQL type reference or runtime type for this element. */\n type: GraphQLInputType;\n /**\n * Deprecated legacy default value used when no explicit value is supplied.\n * Use `default` instead.\n * @deprecated use `default` instead, `defaultValue` will be removed in v18\n */\n defaultValue: unknown;\n /** Default value represented as either a runtime value or a GraphQL literal. */\n default: GraphQLDefaultInput | undefined;\n /**\n * Cached coerced default value.\n * @private\n */\n _memoizedCoercedDefaultValue: unknown;\n /** Reason this element is deprecated, if one was provided. */\n deprecationReason: Maybe<string>;\n /** Custom extension fields reserved for users. */\n extensions: Readonly<GraphQLInputFieldExtensions>;\n /** AST node from which this schema element was built, if available. */\n astNode: Maybe<InputValueDefinitionNode>;\n\n /**\n * Creates a resolved GraphQL input field definition.\n * @param parentType - Input object type that owns this field.\n * @param name - Input field name.\n * @param config - Input field configuration.\n * @example\n * ```ts\n * import { GraphQLInputObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLInputField } from 'graphql/type/definition';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {},\n * });\n * const field = new GraphQLInputField(ReviewInput, 'commentary', {\n * type: GraphQLString,\n * default: { value: '' },\n * });\n *\n * field.parentType; // => ReviewInput\n * field.name; // => 'commentary'\n * field.default?.value; // => ''\n * ```\n */\n constructor(\n parentType: GraphQLInputObjectType,\n name: string,\n config: GraphQLInputFieldConfig,\n ) {\n devAssert(\n !('resolve' in config),\n `${parentType}.${name} field has a resolve property, but Input Types cannot define resolvers.`,\n );\n\n this.__kind = inputFieldSymbol;\n this.parentType = parentType;\n this.name = assertName(name);\n this.description = config.description;\n this.type = config.type;\n this.defaultValue = config.defaultValue;\n this.default = config.default;\n this._memoizedCoercedDefaultValue = undefined;\n this.deprecationReason = config.deprecationReason;\n this.extensions = toObjMapWithSymbols(config.extensions);\n this.astNode = config.astNode;\n }\n\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n get [Symbol.toStringTag](): string {\n return 'GraphQLInputField';\n }\n\n /**\n * Returns a normalized configuration object for this input field.\n * @returns A configuration object that can be used to recreate this input field.\n * @example\n * ```ts\n * import { GraphQLInputObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLInputField } from 'graphql/type/definition';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {},\n * });\n * const field = new GraphQLInputField(ReviewInput, 'commentary', {\n * type: GraphQLString,\n * extensions: { form: 'review' },\n * });\n *\n * field.toConfig().extensions; // => { form: 'review' }\n * ```\n */\n toConfig(): GraphQLInputFieldNormalizedConfig {\n return {\n description: this.description,\n type: this.type,\n defaultValue: this.defaultValue,\n default: this.default,\n deprecationReason: this.deprecationReason,\n extensions: this.extensions,\n astNode: this.astNode,\n };\n }\n\n /**\n * Returns this input field as a schema coordinate string.\n * @returns The input field coordinate.\n * @example\n * ```ts\n * import { GraphQLInputObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLInputField } from 'graphql/type/definition';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {},\n * });\n * const field = new GraphQLInputField(ReviewInput, 'commentary', {\n * type: GraphQLString,\n * });\n *\n * field.toString(); // => 'ReviewInput.commentary'\n * ```\n */\n toString(): string {\n return `${this.parentType}.${this.name}`;\n }\n\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The input field coordinate.\n * @example\n * ```ts\n * import { GraphQLInputObjectType, GraphQLString } from 'graphql/type';\n * import { GraphQLInputField } from 'graphql/type/definition';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {},\n * });\n * const field = new GraphQLInputField(ReviewInput, 'commentary', {\n * type: GraphQLString,\n * });\n *\n * JSON.stringify(field); // => '\"ReviewInput.commentary\"'\n * ```\n */\n toJSON(): string {\n return this.toString();\n }\n}\n\n/**\n * Returns true when the input field is non-null and has no default value.\n * @param field - The input field definition to inspect.\n * @returns True when the input field is non-null and has no default value.\n * @example\n * ```ts\n * import {\n * GraphQLInputObjectType,\n * GraphQLInt,\n * GraphQLNonNull,\n * GraphQLString,\n * isRequiredInputField,\n * } from 'graphql/type';\n * import { GraphQLInputField } from 'graphql/type/definition';\n *\n * const ReviewInput = new GraphQLInputObjectType({\n * name: 'ReviewInput',\n * fields: {},\n * });\n * const requiredField = new GraphQLInputField(ReviewInput, 'id', {\n * type: new GraphQLNonNull(GraphQLInt),\n * });\n * const optionalField = new GraphQLInputField(ReviewInput, 'name', {\n * type: GraphQLString,\n * });\n * const fieldWithDefault = new GraphQLInputField(ReviewInput, 'limit', {\n * type: new GraphQLNonNull(GraphQLInt),\n * default: { value: 10 },\n * });\n *\n * isRequiredInputField(requiredField); // => true\n * isRequiredInputField(optionalField); // => false\n * isRequiredInputField(fieldWithDefault); // => false\n * ```\n */\nexport function isRequiredInputField(field: GraphQLInputField): boolean {\n return (\n isNonNullType(field.type) &&\n field.defaultValue === undefined &&\n field.default === undefined\n );\n}\n\n/** A map of input field names to resolved input field definitions. */\nexport type GraphQLInputFieldMap = ObjMap<GraphQLInputField>;\n"]}