"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isValidLiteralValue=isValidLiteralValue;var_kinds=require("../language/kinds");var_visitor=require("../language/visitor");var_ValuesOfCorrectType=require("../validation/rules/ValuesOfCorrectType");var_ValidationContext=require("../validation/ValidationContext");var_schema=require("../type/schema");var_TypeInfo=require("./TypeInfo");/** * Utility which determines if a value literal node is valid for an input type. * * Deprecated. Rely on validation for documents containing literal values. * * This function will be removed in v15 */functionisValidLiteralValue(type,valueNode){varemptySchema=new_schema.GraphQLSchema({});varemptyDoc={kind:_kinds.Kind.DOCUMENT,definitions:[]};vartypeInfo=new_TypeInfo.TypeInfo(emptySchema,undefined,type);varcontext=new_ValidationContext.ValidationContext(emptySchema,emptyDoc,typeInfo);varvisitor=(0,_ValuesOfCorrectType.ValuesOfCorrectType)(context);(0,_visitor.visit)(valueNode,(0,_visitor.visitWithTypeInfo)(typeInfo,visitor));returncontext.getErrors();}