local l_Parent_0 = script.Parent.Parent;
local l_luaUtils_0 = l_Parent_0.luaUtils;
local v2 = require(l_Parent_0.Parent.LuauPolyfill);
local l_Array_0 = v2.Array;
local l_Error_0 = v2.Error;
local l_Map_0 = v2.Map;
local l_Set_0 = v2.Set;
local v7 = require(l_luaUtils_0.isNillish);
local l_isNillish_0 = v7.isNillish;
local l_isNotNillish_0 = v7.isNotNillish;
local _ = require(l_luaUtils_0.null);
local l_jsutils_0 = l_Parent_0.jsutils;
local l_inspect_0 = require(l_jsutils_0.inspect).inspect;
local l_toObjMap_0 = require(l_jsutils_0.toObjMap).toObjMap;
local l_devAssert_0 = require(l_jsutils_0.devAssert).devAssert;
local v15 = require(l_jsutils_0.instanceOf);
local l_isObjectLike_0 = require(l_jsutils_0.isObjectLike).isObjectLike;
local l___Schema_0 = require(script.Parent.introspection).__Schema;
local _ = require(l_Parent_0.language.ast);
local _ = require(l_Parent_0.error.GraphQLError);
local v20 = require(script.Parent.directives);
local l_isDirective_0 = v20.isDirective;
local l_specifiedDirectives_0 = v20.specifiedDirectives;
local _ = require(l_jsutils_0.ObjMap);
local v24 = require(script.Parent.definition);
local l_isObjectType_0 = v24.isObjectType;
local l_isInterfaceType_0 = v24.isInterfaceType;
local l_isUnionType_0 = v24.isUnionType;
local l_isInputObjectType_0 = v24.isInputObjectType;
local l_getNamedType_0 = v24.getNamedType;
local v30 = nil;
local v31 = nil;
local function v33(v32)
    return v15(v32, v30);
end;
local function v35(v34)
    if not v15(v34, v30) then
        error(l_Error_0.new(("Expected %s to be a GraphQL schema."):format(l_inspect_0(v34))));
    end;
    return v34;
end;
v30 = {};
v30.__index = v30;
v30.new = function(v36)
    local v37 = setmetatable({}, v30);
    v37.__validationErrors = nil;
    if v36.assumeValid == true then
        v37.__validationErrors = {};
    end;
    l_devAssert_0(l_isObjectLike_0(v36), "Must provide configuration object.");
    l_devAssert_0(not v36.types or l_Array_0.isArray(v36.types), ("\"types\" must be Array if provided but got: %s."):format(l_inspect_0(v36.types)));
    l_devAssert_0(not v36.directives or l_Array_0.isArray(v36.directives), "\"directives\" must be Array if provided but got: " .. ("%s."):format(l_inspect_0(v36.directives)));
    v37.description = v36.description;
    v37.extensions = if not v36.extensions then nil else l_toObjMap_0(v36.extensions);
    v37.astNode = v36.astNode;
    v37.extensionASTNodes = v36.extensionASTNodes;
    v37._queryType = v36.query;
    v37._mutationType = v36.mutation;
    v37._subscriptionType = v36.subscription;
    v37._directives = v36.directives or l_specifiedDirectives_0;
    local v38 = l_Set_0.new();
    local l_ipairs_0 = ipairs;
    local v40 = v36.types or {};
    for _, v42 in l_ipairs_0(v40) do
        v38:add(v42);
    end;
    if v36.types ~= nil then
        for _, v44 in ipairs(v36.types) do
            v38:delete(v44);
            v31(v44, v38);
        end;
    end;
    if l_isNotNillish_0(v37._queryType) then
        v31(v37._queryType, v38);
    end;
    if l_isNotNillish_0(v37._mutationType) then
        v31(v37._mutationType, v38);
    end;
    if l_isNotNillish_0(v37._subscriptionType) then
        v31(v37._subscriptionType, v38);
    end;
    for _, v46 in ipairs(v37._directives) do
        if l_isDirective_0(v46) then
            for _, v48 in ipairs(v46.args) do
                v31(v48.type, v38);
            end;
        end;
    end;
    v31(l___Schema_0, v38);
    v37._typeMap = l_Map_0.new();
    v37._subTypeMap = l_Map_0.new();
    v37._implementationsMap = l_Map_0.new();
    for _, v50 in v38, nil, nil do
        if not l_isNillish_0(v50) then
            local v51 = nil;
            v51 = if typeof(v50) == "table" then v50.name else tostring(v50);
            l_devAssert_0(v51 and v51 ~= "", "One of the provided types for building the Schema is missing a name.");
            if v37._typeMap:has(v51) then
                error(l_Error_0.new(("Schema must contain uniquely named types but contains multiple types named \"%s\"."):format(v51)));
            end;
            v37._typeMap:set(v51, v50);
            if not l_isInterfaceType_0(v50) then
                if l_isObjectType_0(v50) then
                    for _, v53 in ipairs(v50:getInterfaces()) do
                        if l_isInterfaceType_0(v53) then
                            local v54 = v37._implementationsMap:get(v53.name);
                            if v54 == nil then
                                v54 = {
                                    objects = {},
                                    interfaces = {}
                                };
                                v37._implementationsMap:set(v53.name, v54);
                            end;
                            table.insert(v54.objects, v50);
                        end;
                    end;
                end;
            else
                for _, v56 in ipairs(v50:getInterfaces()) do
                    if l_isInterfaceType_0(v56) then
                        local v57 = v37._implementationsMap:get(v56.name);
                        if v57 == nil then
                            v57 = {
                                objects = {},
                                interfaces = {}
                            };
                            v37._implementationsMap:set(v56.name, v57);
                        end;
                        table.insert(v57.interfaces, v50);
                    end;
                end;
            end;
        end;
    end;
    return v37;
end;
v30.getQueryType = function(v58)
    return v58._queryType;
end;
v30.getMutationType = function(v59)
    return v59._mutationType;
end;
v30.getSubscriptionType = function(v60)
    return v60._subscriptionType;
end;
v30.getTypeMap = function(v61)
    return v61._typeMap;
end;
v30.getType = function(v62, v63)
    return v62:getTypeMap()[v63];
end;
v30.getPossibleTypes = function(v64, v65)
    if not l_isUnionType_0(v65) then
        return v64:getImplementations(v65).objects;
    else
        return v65:getTypes();
    end;
end;
v30.getImplementations = function(v66, v67)
    return v66._implementationsMap:get(v67.name) or {
        objects = {},
        interfaces = {}
    };
end;
v30.isSubType = function(v68, v69, v70)
    local v71 = v68._subTypeMap[v69.name];
    if v71 == nil then
        v71 = {};
        if not l_isUnionType_0(v69) then
            local v72 = v68:getImplementations(v69);
            for _, v74 in ipairs(v72.objects) do
                v71[v74.name] = true;
            end;
            for _, v76 in ipairs(v72.interfaces) do
                v71[v76.name] = true;
            end;
        else
            for _, v78 in ipairs(v69:getTypes()) do
                v71[v78.name] = true;
            end;
        end;
        v68._subTypeMap:set(v69.name, v71);
    end;
    return v71[v70.name] ~= nil;
end;
v30.getDirectives = function(v79)
    return v79._directives;
end;
v30.getDirective = function(v80, v81)
    return l_Array_0.find(v80:getDirectives(), function(v82)
        return v82.name == v81;
    end);
end;
v30.toConfig = function(v83)
    return {
        description = v83.description,
        query = v83:getQueryType(),
        mutation = v83:getMutationType(),
        subscription = v83:getSubscriptionType(),
        types = v83:getTypeMap():values(),
        directives = l_Array_0.slice(v83:getDirectives()),
        extensions = v83.extensions,
        astNode = v83.astNode,
        extensionASTNodes = v83.extensionASTNodes or {},
        assumeValid = v83.__validationErrors ~= nil
    };
end;
v30.__tostring = function(_)
    return "GraphQLSchema";
end;
v31 = function(v85, v86)
    local v87 = l_getNamedType_0(v85);
    if not v86:has(v87) then
        v86:add(v87);
        if not l_isUnionType_0(v87) then
            if not l_isObjectType_0(v87) and not l_isInterfaceType_0(v87) then
                if l_isInputObjectType_0(v87) then
                    for _, v89 in ipairs(v87:getFields():values()) do
                        v31(v89.type, v86);
                    end;
                end;
            else
                for _, v91 in ipairs(v87:getInterfaces()) do
                    v31(v91, v86);
                end;
                for _, v93 in ipairs(v87:getFields():values()) do
                    v31(v93.type, v86);
                    for _, v95 in ipairs(v93.args) do
                        v31(v95.type, v86);
                    end;
                end;
                return v86;
            end;
        else
            for _, v97 in ipairs(v87:getTypes()) do
                v31(v97, v86);
            end;
            return v86;
        end;
    end;
    return v86;
end;
return {
    isSchema = v33,
    assertSchema = v35,
    GraphQLSchema = v30
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.LuauPolyfill);
local l_Array_0 = v1.Array;
local l_Boolean_0 = v1.Boolean;
local l_Error_0 = v1.Error;
local l_isNotNillish_0 = require(l_Parent_0.luaUtils.isNillish).isNotNillish;
local l_inspect_0 = require(script.Parent.Parent.jsutils.inspect).inspect;
local l_GraphQLError_0 = require(script.Parent.Parent.error.GraphQLError).GraphQLError;
local l_locatedError_0 = require(script.Parent.Parent.error).locatedError;
local _ = require(l_Parent_0.language.ast);
local l_isValidNameError_0 = require(l_Parent_0.utilities.assertValidName).isValidNameError;
local v11 = require(script.Parent.Parent.utilities.typeComparators);
local l_isEqualType_0 = v11.isEqualType;
local l_isTypeSubTypeOf_0 = v11.isTypeSubTypeOf;
local l_assertSchema_0 = require(script.Parent.schema).assertSchema;
local v15 = require(script.Parent.definition);
local l_isIntrospectionType_0 = require(script.Parent.introspection).isIntrospectionType;
local v17 = require(script.Parent.directives);
local l_isDirective_0 = v17.isDirective;
local l_GraphQLDeprecatedDirective_0 = v17.GraphQLDeprecatedDirective;
local l_isObjectType_0 = v15.isObjectType;
local l_isInterfaceType_0 = v15.isInterfaceType;
local l_isUnionType_0 = v15.isUnionType;
local l_isEnumType_0 = v15.isEnumType;
local l_isInputObjectType_0 = v15.isInputObjectType;
local l_isNamedType_0 = v15.isNamedType;
local l_isNonNullType_0 = v15.isNonNullType;
local l_isInputType_0 = v15.isInputType;
local l_isOutputType_0 = v15.isOutputType;
local l_isRequiredArgument_0 = v15.isRequiredArgument;
local l_isRequiredInputField_0 = v15.isRequiredInputField;
local v31 = nil;
local v32 = nil;
local v33 = nil;
local v34 = nil;
local v35 = nil;
local v36 = nil;
local v37 = nil;
local v38 = nil;
local v39 = nil;
local v40 = nil;
local v41 = nil;
local v42 = nil;
local v43 = nil;
local v44 = nil;
local v45 = nil;
local v46 = nil;
local function v50(v47)
    l_assertSchema_0(v47);
    if v47.__validationErrors ~= nil then
        return v47.__validationErrors;
    else
        local v48 = v31.new(v47);
        v32(v48);
        v33(v48);
        v44(v48);
        local v49 = v48:getErrors();
        v47.__validationErrors = v49;
        return v49;
    end;
end;
local function v54(v51)
    local v52 = v50(v51);
    if #v52 ~= 0 then
        error(l_Error_0.new(l_Array_0.join(l_Array_0.map(v52, function(v53)
            return v53.message;
        end), "\n\n")));
    end;
end;
v31 = {};
v31.__index = v31;
v31.new = function(v55)
    local v56 = setmetatable({}, v31);
    v56._errors = {};
    v56.schema = v55;
    return v56;
end;
v31.reportError = function(v57, v58, v59)
    v57:addError(l_GraphQLError_0.new(v58, if not l_Array_0.isArray(v59) then v59 else l_Array_0.filter(v59, l_Boolean_0.toJSBoolean)));
end;
v31.addError = function(v60, v61)
    table.insert(v60._errors, v61);
end;
v31.getErrors = function(v62)
    return v62._errors;
end;
v32 = function(v63)
    local l_schema_0 = v63.schema;
    local v65 = l_schema_0:getQueryType();
    if l_isNotNillish_0(v65) then
        if not l_isObjectType_0(v65) then
            v63:reportError(("Query root type must be Object type, it cannot be %s."):format(l_inspect_0(v65)), v34(l_schema_0, "query") or v65.astNode);
        end;
    else
        v63:reportError("Query root type must be provided.", l_schema_0.astNode);
    end;
    local v66 = l_schema_0:getMutationType();
    if not (not l_isNotNillish_0(v66) or l_isObjectType_0(v66)) then
        v63:reportError("Mutation root type must be Object type if provided, it cannot be " .. ("%s."):format(l_inspect_0(v66)), v34(l_schema_0, "mutation") or v66.astNode);
    end;
    local v67 = l_schema_0:getSubscriptionType();
    if not (not l_isNotNillish_0(v67) or l_isObjectType_0(v67)) then
        v63:reportError("Subscription root type must be Object type if provided, it cannot be " .. ("%s."):format(l_inspect_0(v67)), v34(l_schema_0, "subscription") or v67.astNode);
    end;
end;
v34 = function(v68, v69)
    for _, v72 in ipairs((v35(v68, function(v70)
        return v70.operationTypes;
    end))) do
        if v72.operation == v69 then
            return v72.type;
        end;
    end;
    return nil;
end;
v33 = function(v73)
    for _, v75 in ipairs(v73.schema:getDirectives()) do
        if l_isDirective_0(v75) then
            v41(v73, v75);
            for _, v77 in ipairs(v75.args) do
                v41(v73, v77);
                if not l_isInputType_0(v77.type) then
                    v73:reportError(("The type of @%s(%s:) must be Input Type "):format(v75.name, v77.name) .. ("but got: %s."):format(l_inspect_0(v77.type)), v77.astNode);
                end;
                if not (not l_isRequiredArgument_0(v77) or not l_isNotNillish_0(v77.deprecationReason)) then
                    v73:reportError(("Required argument @%s(%s:) cannot be deprecated."):format(v75.name, v77.name), {
                        v38(v77.astNode),
                        if v77.astNode ~= nil then v77.astNode.type else nil
                    });
                end;
            end;
        else
            v73:reportError(("Expected directive but got: %s."):format(l_inspect_0(v75)), if not v75 then nil else v75.astNode);
        end;
    end;
end;
v41 = function(v78, v79)
    local v80 = nil;
    local v81 = nil;
    if typeof(v79) == "table" then
        v80 = v79.name;
        v81 = v79.astNode;
    else
        v80 = tostring(v79);
    end;
    local v82 = l_isValidNameError_0(v80);
    if v82 then
        v78:addError(l_locatedError_0(v82, v81));
    end;
end;
v44 = function(v83)
    local v84 = createInputObjectCircularRefsValidator(v83);
    for _, v86 in ipairs(v83.schema:getTypeMap():values()) do
        local v87 = nil;
        if typeof(v86) == "table" then
            v87 = v86.astNode;
        end;
        if l_isNamedType_0(v86) then
            if not l_isIntrospectionType_0(v86) then
                v41(v83, v86);
            end;
            if not l_isObjectType_0(v86) then
                if not l_isInterfaceType_0(v86) then
                    if not l_isUnionType_0(v86) then
                        if not l_isEnumType_0(v86) then
                            if l_isInputObjectType_0(v86) then
                                validateInputFields(v83, v86);
                                v84(v86);
                            end;
                        else
                            v40(v83, v86);
                        end;
                    else
                        validateUnionMembers(v83, v86);
                    end;
                else
                    v42(v83, v86);
                    v46(v83, v86);
                end;
            else
                v42(v83, v86);
                v46(v83, v86);
            end;
        else
            v83:reportError(("Expected GraphQL named type but got: %s."):format(l_inspect_0(v86)), v87);
        end;
    end;
end;
v42 = function(v88, v89)
    local v90 = v89:getFields():values();
    if #v90 == 0 then
        v88:reportError(("Type %s must define one or more fields."):format(v89.name), v36(v89));
    end;
    for _, v92 in ipairs(v90) do
        v41(v88, v92);
        if not l_isOutputType_0(v92.type) then
            v88:reportError(("The type of %s.%s must be Output Type "):format(v89.name, v92.name) .. ("but got: %s."):format(l_inspect_0(v92.type)), if v92.astNode ~= nil then v92.astNode.type else nil);
        end;
        for _, v94 in ipairs(v92.args) do
            local l_name_0 = v94.name;
            v41(v88, v94);
            if not l_isInputType_0(v94.type) then
                v88:reportError(("The type of %s.%s(%s:) must be Input "):format(v89.name, v92.name, l_name_0) .. ("Type but got: %s."):format(l_inspect_0(v94.type)), if v94.astNode ~= nil then v94.astNode.type else nil);
            end;
            if not (not l_isRequiredArgument_0(v94) or not l_isNotNillish_0(v94.deprecationReason)) then
                v88:reportError(("Required argument %s.%s(%s:) cannot be deprecated."):format(v89.name, v92.name, l_name_0), {
                    v38(v94.astNode),
                    if v94.astNode ~= nil then v94.astNode.type else nil
                });
            end;
        end;
    end;
end;
v46 = function(v96, v97)
    local v98 = {};
    for _, v100 in ipairs(v97:getInterfaces()) do
        if l_isInterfaceType_0(v100) then
            if v97 == v100 then
                v96:reportError(("Type %s cannot implement itself because it would create a circular reference."):format(v97.name), v37(v97, v100));
            else
                local v101 = if typeof(nil) == "table" then tostring(v100.name) else tostring(v100);
                if not v98[v101] then
                    v98[v101] = true;
                    v43(v96, v97, v100);
                    v45(v96, v97, v100);
                else
                    v96:reportError(("Type %s can only implement %s once."):format(v97.name, v100.name), v37(v97, v100));
                end;
            end;
        else
            v96:reportError(("Type %s must only implement Interface types, "):format(l_inspect_0(v97)) .. ("it cannot implement %s."):format(l_inspect_0(v100)), v37(v97, v100));
        end;
    end;
end;
v45 = function(v102, v103, v104)
    local v105 = v103:getFields();
    for _, v107 in ipairs(v104:getFields():values()) do
        local l_name_1 = v107.name;
        local v109 = v105:get(l_name_1);
        if v109 then
            if not l_isTypeSubTypeOf_0(v102.schema, v109.type, v107.type) then
                v102:reportError(("Interface field %s.%s expects type "):format(v104.name, l_name_1) .. ("%s but %s.%s "):format(l_inspect_0(v107.type), v103.name, l_name_1) .. ("is type %s."):format(l_inspect_0(v109.type)), {
                    if v107.astNode ~= nil then v107.astNode.type else nil,
                    if v109.astNode ~= nil then v109.astNode.type else nil
                });
            end;
            for _, v111 in ipairs(v107.args) do
                local l_name_2 = v111.name;
                local v114 = l_Array_0.find(v109.args, function(v113)
                    return v113.name == l_name_2;
                end);
                if v114 then
                    if not l_isEqualType_0(v111.type, v114.type) then
                        v102:reportError(("Interface field argument %s.%s(%s:) "):format(v104.name, l_name_1, l_name_2) .. ("expects type %s but "):format(l_inspect_0(v111.type)) .. ("%s.%s(%s:) is type "):format(v103.name, l_name_1, l_name_2) .. ("%s."):format(l_inspect_0(v114.type)), {
                            if v111.astNode ~= nil then v111.astNode.type else nil,
                            if v114.astNode ~= nil then v114.astNode.type else nil
                        });
                    end;
                else
                    v102:reportError(("Interface field argument %s.%s(%s:) expected but %s.%s does not provide it."):format(v104.name, l_name_1, l_name_2, v103.name, l_name_1), {
                        v111.astNode,
                        v109.astNode
                    });
                end;
            end;
            for _, v116 in ipairs(v109.args) do
                local l_name_3 = v116.name;
                if not (l_Array_0.find(v107.args, function(v118)
                    return v118.name == l_name_3;
                end) or not l_isRequiredArgument_0(v116)) then
                    v102:reportError(("Object field %s.%s includes required argument %s that is missing from the Interface field %s.%s."):format(v103.name, l_name_1, l_name_3, v104.name, l_name_1), {
                        v116.astNode,
                        v107.astNode
                    });
                end;
            end;
        else
            v102:reportError(("Interface field %s.%s expected but %s does not provide it."):format(v104.name, l_name_1, v103.name), l_Array_0.concat({
                v107.astNode
            }, v36(v103)));
        end;
    end;
end;
v43 = function(v119, v120, v121)
    local v122 = v120:getInterfaces();
    for _, v124 in ipairs(v121:getInterfaces()) do
        if l_Array_0.indexOf(v122, v124) == -1 then
            v119:reportError(if v124 == v120 then ("Type %s cannot implement %s because it would create a circular reference."):format(v120.name, v121.name) else ("Type %s must implement %s because it is implemented by %s."):format(v120.name, v124.name, v121.name), l_Array_0.concat(v37(v121, v124), v37(v120, v121)));
        end;
    end;
end;
validateUnionMembers = function(v125, v126)
    local v127 = v126:getTypes();
    if #v127 == 0 then
        v125:reportError(("Union type %s must define one or more member types."):format(v126.name), v36(v126));
    end;
    local v128 = {};
    for _, v130 in ipairs(v127) do
        if not v128[tostring(v130.name)] then
            v128[tostring(v130.name)] = true;
            if not l_isObjectType_0(v130) then
                v125:reportError(("Union type %s can only include Object types, "):format(v126.name) .. ("it cannot include %s."):format(l_inspect_0(v130)), v39(v126, (tostring(v130))));
            end;
        else
            v125:reportError(("Union type %s can only include type %s once."):format(v126.name, v130.name), v39(v126, v130.name));
        end;
    end;
end;
v40 = function(v131, v132)
    local v133 = v132:getValues();
    if #v133 == 0 then
        v131:reportError(("Enum type %s must define one or more values."):format(v132.name), v36(v132));
    end;
    for _, v135 in ipairs(v133) do
        local l_name_4 = v135.name;
        v41(v131, v135);
        if not (l_name_4 ~= "true" and l_name_4 ~= "false") or l_name_4 == "null" then
            v131:reportError(("Enum type %s cannot include value: %s."):format(v132.name, l_name_4), v135.astNode);
        end;
    end;
end;
validateInputFields = function(v137, v138)
    local v139 = v138:getFields():values();
    if #v139 == 0 then
        v137:reportError(("Input Object type %s must define one or more fields."):format(v138.name), v36(v138));
    end;
    for _, v141 in ipairs(v139) do
        v41(v137, v141);
        if not l_isInputType_0(v141.type) then
            v137:reportError(("The type of %s.%s must be Input Type "):format(v138.name, v141.name) .. ("but got: %s."):format(l_inspect_0(v141.type)), if v141.astNode ~= nil then v141.astNode.type else nil);
        end;
        if not (not l_isRequiredInputField_0(v141) or not l_isNotNillish_0(v141.deprecationReason)) then
            v137:reportError(("Required input field %s.%s cannot be deprecated."):format(v138.name, v141.name), {
                v38(v141.astNode),
                if v141.astNode ~= nil then v141.astNode.type else nil
            });
        end;
    end;
end;
createInputObjectCircularRefsValidator = function(v142)
    local v143 = {};
    local v144 = {};
    local v145 = {};
    local function v146(v147)
        if not v143[tostring(v147.name)] then
            v143[tostring(v147.name)] = true;
            v145[tostring(v147.name)] = #v144 + 1;
            for _, v149 in ipairs((v147:getFields():values())) do
                if not (not l_isNonNullType_0(v149.type) or not l_isInputObjectType_0(v149.type.ofType)) then
                    local l_ofType_0 = v149.type.ofType;
                    local v151 = v145[tostring(l_ofType_0.name)];
                    table.insert(v144, v149);
                    if v151 == nil then
                        v146(l_ofType_0);
                    else
                        local v152 = nil;
                        v152 = l_Array_0.slice(v144, v151);
                        v142:reportError(("Cannot reference Input Object \"%s\" within itself through a series of non-null fields: \"%s\"."):format(l_ofType_0.name, (l_Array_0.join(l_Array_0.map(v152, function(v153)
                            return v153.name;
                        end), "."))), l_Array_0.map(v152, function(v154)
                            return v154.astNode;
                        end));
                    end;
                    table.remove(v144);
                end;
            end;
            v145[tostring(v147.name)] = nil;
            return ;
        else
            return ;
        end;
    end;
    return v146;
end;
v36 = function(v155)
    local l_astNode_0 = v155.astNode;
    local l_extensionASTNodes_0 = v155.extensionASTNodes;
    if not l_astNode_0 then
        if not l_extensionASTNodes_0 then
            return {};
        else
            return l_extensionASTNodes_0;
        end;
    elseif not l_extensionASTNodes_0 then
        return {
            l_astNode_0
        };
    else
        return (l_Array_0.concat({
            l_astNode_0
        }, l_extensionASTNodes_0));
    end;
end;
v35 = function(v158, v159)
    local v160 = {};
    for _, v162 in ipairs(v36(v158)) do
        v160 = l_Array_0.concat(v160, v159(v162) or {});
    end;
    return v160;
end;
v37 = function(v163, v164)
    return l_Array_0.filter(v35(v163, function(v165)
        return v165.interfaces;
    end), function(v166)
        return v166.name.value == v164.name;
    end);
end;
v39 = function(v167, v168)
    return l_Array_0.filter(v35(v167, function(v169)
        return v169.types;
    end), function(v170)
        return v170.name.value == v168;
    end);
end;
v38 = function(v171)
    if v171 ~= nil and v171.directives ~= nil then
        return l_Array_0.find(v171.directives, function(v172)
            return v172.name.value == l_GraphQLDeprecatedDirective_0.name;
        end);
    else
        return ;
    end;
end;
return {
    validateSchema = v50,
    assertValidSchema = v54
};


local l_Parent_0 = script.Parent.Parent;
local l_Array_0 = require(l_Parent_0.Parent.LuauPolyfill).Array;
local v2 = require(l_Parent_0.luaUtils.null);
local l_language_0 = l_Parent_0.language;
local l_type_0 = l_Parent_0.type;
local v5 = require(l_language_0.visitor);
local v6 = require(l_language_0.ast);
local l_Kind_0 = require(l_language_0.kinds).Kind;
local l_isNode_0 = v6.isNode;
local l_getVisitFn_0 = v5.getVisitFn;
local _ = require(l_type_0.schema);
local _ = require(l_type_0.directives);
local v12 = require(l_type_0.definition);
local l_isObjectType_0 = v12.isObjectType;
local l_isInterfaceType_0 = v12.isInterfaceType;
local l_isEnumType_0 = v12.isEnumType;
local l_isInputObjectType_0 = v12.isInputObjectType;
local l_isListType_0 = v12.isListType;
local l_isCompositeType_0 = v12.isCompositeType;
local l_isInputType_0 = v12.isInputType;
local l_isOutputType_0 = v12.isOutputType;
local l_getNullableType_0 = v12.getNullableType;
local l_getNamedType_0 = v12.getNamedType;
local v23 = require(l_type_0.introspection);
local l_SchemaMetaFieldDef_0 = v23.SchemaMetaFieldDef;
local l_TypeMetaFieldDef_0 = v23.TypeMetaFieldDef;
local l_TypeNameMetaFieldDef_0 = v23.TypeNameMetaFieldDef;
local l_typeFromAST_0 = require(l_Parent_0.utilities.typeFromAST).typeFromAST;
local function _(v28)
    if v28 == v2 then
        return nil;
    else
        return v28;
    end;
end;
local v30 = {};
local v31 = {
    __index = v30
};
local v32 = nil;
v30.new = function(v33, v34, v35)
    local v36 = setmetatable({}, v31);
    v36._schema = v33;
    v36._typeStack = {};
    v36._parentTypeStack = {};
    v36._inputTypeStack = {};
    v36._fieldDefStack = {};
    v36._defaultValueStack = {};
    v36._directive = nil;
    v36._argument = nil;
    v36._enumValue = nil;
    v36._getFieldDef = v34 or v32;
    if v35 then
        if l_isInputType_0(v35) then
            table.insert(v36._inputTypeStack, v35);
        end;
        if l_isCompositeType_0(v35) then
            table.insert(v36._parentTypeStack, v35);
        end;
        if l_isOutputType_0(v35) then
            table.insert(v36._typeStack, v35);
        end;
    end;
    return v36;
end;
v30.getType = function(v37)
    if #v37._typeStack > 0 then
        local v38 = v37._typeStack[#v37._typeStack];
        if v38 == v2 then
            return nil;
        else
            return v38;
        end;
    else
        return nil;
    end;
end;
v30.getParentType = function(v39)
    if #v39._parentTypeStack > 0 then
        local v40 = v39._parentTypeStack[#v39._parentTypeStack];
        if v40 == v2 then
            return nil;
        else
            return v40;
        end;
    else
        return nil;
    end;
end;
v30.getInputType = function(v41)
    if #v41._inputTypeStack > 0 then
        local v42 = v41._inputTypeStack[#v41._inputTypeStack];
        if v42 == v2 then
            return nil;
        else
            return v42;
        end;
    else
        return nil;
    end;
end;
v30.getParentInputType = function(v43)
    if #v43._inputTypeStack > 1 then
        local v44 = v43._inputTypeStack[#v43._inputTypeStack - 1];
        if v44 == v2 then
            return nil;
        else
            return v44;
        end;
    else
        return nil;
    end;
end;
v30.getFieldDef = function(v45)
    if #v45._fieldDefStack > 0 then
        local v46 = v45._fieldDefStack[#v45._fieldDefStack];
        if v46 == v2 then
            return nil;
        else
            return v46;
        end;
    else
        return nil;
    end;
end;
v30.getDefaultValue = function(v47)
    if #v47._defaultValueStack > 0 then
        local v48 = v47._defaultValueStack[#v47._defaultValueStack];
        if v48 == v2 then
            return nil;
        else
            return v48;
        end;
    else
        return nil;
    end;
end;
v30.getDirective = function(v49)
    return v49._directive;
end;
v30.getArgument = function(v50)
    return v50._argument;
end;
v30.getEnumValue = function(v51)
    return v51._enumValue;
end;
v30.enter = function(v52, v53)
    local l__schema_0 = v52._schema;
    local l_kind_0 = v53.kind;
    if l_kind_0 == l_Kind_0.SELECTION_SET then
        local v56 = l_getNamedType_0(v52:getType());
        table.insert(v52._parentTypeStack, if not l_isCompositeType_0(v56) then v2 else v56);
        return ;
    elseif l_kind_0 == l_Kind_0.FIELD then
        local v57 = v52:getParentType();
        local v58 = nil;
        local v59 = nil;
        if v57 then
            v58 = v52._getFieldDef(l__schema_0, v57, v53);
            if v58 then
                v59 = v58.type;
            end;
        end;
        table.insert(v52._fieldDefStack, if not v58 then v2 else v58);
        table.insert(v52._typeStack, if not l_isOutputType_0(v59) then v2 else v59);
        return ;
    elseif l_kind_0 == l_Kind_0.DIRECTIVE then
        v52._directive = l__schema_0:getDirective(v53.name.value);
        return ;
    elseif l_kind_0 == l_Kind_0.OPERATION_DEFINITION then
        local v60 = nil;
        local l_operation_0 = v53.operation;
        if l_operation_0 == "query" then
            v60 = l__schema_0:getQueryType();
        elseif l_operation_0 == "mutation" then
            v60 = l__schema_0:getMutationType();
        elseif l_operation_0 == "subscription" then
            v60 = l__schema_0:getSubscriptionType();
        end;
        table.insert(v52._typeStack, if not l_isObjectType_0(v60) then v2 else v60);
        return ;
    elseif not (l_kind_0 ~= l_Kind_0.INLINE_FRAGMENT) or l_kind_0 == l_Kind_0.FRAGMENT_DEFINITION then
        local l_typeCondition_0 = v53.typeCondition;
        local v63 = if not l_typeCondition_0 then l_getNamedType_0(v52:getType()) else l_typeFromAST_0(l__schema_0, l_typeCondition_0);
        table.insert(v52._typeStack, if not l_isOutputType_0(v63) then v2 else v63);
        return ;
    elseif l_kind_0 == l_Kind_0.VARIABLE_DEFINITION then
        local v64 = l_typeFromAST_0(l__schema_0, v53.type);
        table.insert(v52._inputTypeStack, if not l_isInputType_0(v64) then v2 else v64);
        return ;
    elseif l_kind_0 == l_Kind_0.ARGUMENT then
        local v65 = nil;
        local v66 = nil;
        local v67 = v52:getDirective() or v52:getFieldDef();
        if v67 then
            v65 = l_Array_0.find(v67.args, function(v68)
                return v68.name == v53.name.value;
            end);
            if v65 then
                v66 = v65.type;
            end;
        end;
        v52._argument = v65;
        table.insert(v52._defaultValueStack, if not v65 then v2 else v65.defaultValue);
        table.insert(v52._inputTypeStack, if not l_isInputType_0(v66) then v2 else v66);
        return ;
    elseif l_kind_0 == l_Kind_0.LIST then
        local v69 = l_getNullableType_0(v52:getInputType());
        local v70 = if not l_isListType_0(v69) then v69 else v69.ofType;
        table.insert(v52._defaultValueStack, v2);
        table.insert(v52._inputTypeStack, if not l_isInputType_0(v70) then v2 else v70);
        return ;
    elseif l_kind_0 == l_Kind_0.OBJECT_FIELD then
        local v71 = l_getNamedType_0(v52:getInputType());
        local v72 = nil;
        local v73 = nil;
        if l_isInputObjectType_0(v71) then
            v73 = v71:getFields():get(v53.name.value);
            if v73 then
                v72 = v73.type;
            end;
        end;
        table.insert(v52._defaultValueStack, if not v73 then v2 else v73.defaultValue);
        table.insert(v52._inputTypeStack, if not l_isInputType_0(v72) then v2 else v72);
        return ;
    elseif l_kind_0 == l_Kind_0.ENUM then
        local v74 = l_getNamedType_0(v52:getInputType());
        local v75 = nil;
        if l_isEnumType_0(v74) then
            v75 = v74:getValue(v53.value);
        end;
        v52._enumValue = v75;
        return ;
    else
        return ;
    end;
end;
v30.leave = function(v76, v77)
    local l_kind_1 = v77.kind;
    if l_kind_1 == l_Kind_0.SELECTION_SET then
        table.remove(v76._parentTypeStack);
        return ;
    elseif l_kind_1 == l_Kind_0.FIELD then
        table.remove(v76._fieldDefStack);
        table.remove(v76._typeStack);
        return ;
    elseif l_kind_1 == l_Kind_0.DIRECTIVE then
        v76._directive = nil;
        return ;
    elseif not (l_kind_1 ~= l_Kind_0.OPERATION_DEFINITION and l_kind_1 ~= l_Kind_0.INLINE_FRAGMENT) or l_kind_1 == l_Kind_0.FRAGMENT_DEFINITION then
        table.remove(v76._typeStack);
        return ;
    elseif l_kind_1 == l_Kind_0.VARIABLE_DEFINITION then
        table.remove(v76._inputTypeStack);
        return ;
    elseif l_kind_1 == l_Kind_0.ARGUMENT then
        v76._argument = nil;
        table.remove(v76._defaultValueStack);
        table.remove(v76._inputTypeStack);
        return ;
    elseif not (l_kind_1 ~= l_Kind_0.LIST) or l_kind_1 == l_Kind_0.OBJECT_FIELD then
        table.remove(v76._defaultValueStack);
        table.remove(v76._inputTypeStack);
        return ;
    else
        if l_kind_1 == l_Kind_0.ENUM then
            v76._enumValue = nil;
        end;
        return ;
    end;
end;
v32 = function(v79, v80, v81)
    local l_value_0 = v81.name.value;
    if l_value_0 == l_SchemaMetaFieldDef_0.name and v79:getQueryType() == v80 then
        return l_SchemaMetaFieldDef_0;
    elseif l_value_0 == l_TypeMetaFieldDef_0.name and v79:getQueryType() == v80 then
        return l_TypeMetaFieldDef_0;
    elseif not (l_value_0 == l_TypeNameMetaFieldDef_0.name) or not l_isCompositeType_0(v80) then
        if not l_isObjectType_0(v80) and not l_isInterfaceType_0(v80) then
            return nil;
        else
            return v80:getFields():get(l_value_0);
        end;
    else
        return l_TypeNameMetaFieldDef_0;
    end;
end;
return {
    TypeInfo = v30,
    visitWithTypeInfo = function(v83, v84)
        return {
            enter = function(_, v86, ...)
                v83:enter(v86);
                local v87 = l_getVisitFn_0(v84, v86.kind, false);
                if not v87 then
                    return nil;
                else
                    local v88 = v87(v84, v86, ...);
                    if v88 ~= nil then
                        v83:leave(v86);
                        if l_isNode_0(v88) then
                            v83:enter(v88);
                        end;
                    end;
                    return v88;
                end;
            end,
            leave = function(_, v90, ...)
                local v91 = l_getVisitFn_0(v84, v90.kind, true);
                local v92 = nil;
                if v91 then
                    v92 = v91(v84, v90, ...);
                end;
                v83:leave(v90);
                return v92;
            end
        };
    end
};


local l_Parent_0 = script.Parent.Parent;
local l_devAssert_0 = require(l_Parent_0.jsutils.devAssert).devAssert;
local l_GraphQLError_0 = require(l_Parent_0.error.GraphQLError).GraphQLError;
local v3 = nil;
local v4 = nil;
v4 = function(v5)
    local v6 = v3(v5);
    if v6 then
        error(v6);
    end;
    return v5;
end;
v3 = function(v7)
    l_devAssert_0(type(v7) == "string", "Expected name to be a string.");
    if (string.len(v7) > 1 and v7:sub(1, 1) == "_") and v7:sub(2, 2) == "_" then
        return l_GraphQLError_0.new("Name \"" .. v7 .. "\" must not begin with \"__\", which is reserved by GraphQL introspection.");
    else
        local v8, v9 = string.find(v7, "[_%a][_%a%d]*");
        local v10 = false;
        if v8 == 1 then
            v10 = string.len(v7) == v9;
        end;
        if v10 then
            return nil;
        else
            return l_GraphQLError_0.new("Names must match [_%a][_%a%d]* but \"" .. v7 .. "\" does not.");
        end;
    end;
end;
return {
    assertValidName = v4,
    isValidNameError = v3
};


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_luaUtils_0 = l_Parent_0.luaUtils;
local v3 = require(l_Parent_1.LuauPolyfill);
local l_Error_0 = v3.Error;
local l_Number_0 = v3.Number;
local v6 = require(l_Parent_1.RegExp);
local l_inspect_0 = require(l_Parent_0.jsutils.inspect).inspect;
local l_invariant_0 = require(l_Parent_0.jsutils.invariant).invariant;
local l_isObjectLike_0 = require(l_Parent_0.jsutils.isObjectLike).isObjectLike;
local l_isIteratableObject_0 = require(l_Parent_0.jsutils.isIteratableObject).isIteratableObject;
local _ = require(l_Parent_0.language.ast);
local l_Kind_0 = require(l_Parent_0.language.kinds).Kind;
local l_GraphQLID_0 = require(l_Parent_0.type.scalars).GraphQLID;
local v14 = require(l_Parent_0.type.definition);
local l_isLeafType_0 = v14.isLeafType;
local l_isEnumType_0 = v14.isEnumType;
local l_isInputObjectType_0 = v14.isInputObjectType;
local l_isListType_0 = v14.isListType;
local l_isNonNullType_0 = v14.isNonNullType;
local v20 = require(l_luaUtils_0.null);
local v21 = require(l_luaUtils_0.isNillish);
local l_isNillish_0 = v21.isNillish;
local l_isNotNillish_0 = v21.isNotNillish;
local v24 = nil;
local function v25(v26, v27)
    if not l_isNonNullType_0(v27) then
        if v26 == v20 then
            return {
                kind = l_Kind_0.NULL
            };
        elseif v26 == nil then
            return v20;
        elseif not l_isListType_0(v27) then
            if not l_isInputObjectType_0(v27) then
                if l_isLeafType_0(v27) then
                    local v28 = v27:serialize(v26);
                    if not l_isNillish_0(v28) then
                        if typeof(v28) == "boolean" then
                            return {
                                kind = l_Kind_0.BOOLEAN,
                                value = v28
                            };
                        elseif not (typeof(v28) == "number") or not l_Number_0.isFinite(v28) then
                            if typeof(v28) == "string" then
                                if not l_isEnumType_0(v27) then
                                    if not (v27 == l_GraphQLID_0) or not v24:test(v28) then
                                        return {
                                            kind = l_Kind_0.STRING,
                                            value = v28
                                        };
                                    else
                                        return {
                                            kind = l_Kind_0.INT,
                                            value = v28
                                        };
                                    end;
                                else
                                    return {
                                        kind = l_Kind_0.ENUM,
                                        value = v28
                                    };
                                end;
                            else
                                error(l_Error_0.new(("Cannot convert value to AST: %s."):format(l_inspect_0(v28))));
                            end;
                        else
                            local v29 = tostring(v28);
                            if not v24:test(v29) then
                                return {
                                    kind = l_Kind_0.FLOAT,
                                    value = v29
                                };
                            else
                                return {
                                    kind = l_Kind_0.INT,
                                    value = v29
                                };
                            end;
                        end;
                    else
                        return v20;
                    end;
                end;
                l_invariant_0(false, "Unexpected input type: " .. l_inspect_0(v27));
                return ;
            elseif l_isObjectLike_0(v26) then
                local v30 = {};
                for _, v32 in ipairs(v27:getFields():values()) do
                    local v33 = v25(v26[v32.name], v32.type);
                    if l_isNotNillish_0(v33) then
                        table.insert(v30, {
                            kind = l_Kind_0.OBJECT_FIELD,
                            name = {
                                kind = l_Kind_0.NAME,
                                value = v32.name
                            },
                            value = v33
                        });
                    end;
                end;
                return {
                    kind = l_Kind_0.OBJECT,
                    fields = v30
                };
            else
                return v20;
            end;
        else
            local l_ofType_0 = v27.ofType;
            if not l_isIteratableObject_0(v26) then
                return v25(v26, l_ofType_0);
            else
                local v35 = {};
                for _, v37 in pairs(v26) do
                    local v38 = v25(v37, l_ofType_0);
                    if l_isNotNillish_0(v38) then
                        table.insert(v35, v38);
                    end;
                end;
                return {
                    kind = l_Kind_0.LIST,
                    values = v35
                };
            end;
        end;
    else
        local v39 = v25(v26, v27.ofType);
        local v40 = false;
        if v39 ~= nil then
            v40 = false;
            if v39 ~= v20 then
                v40 = v39.kind;
            end;
        end;
        if v40 == l_Kind_0.NULL then
            return v20;
        else
            return v39;
        end;
    end;
end;
v24 = v6("^-?(?:0|[1-9][0-9]*)$");
return {
    astFromValue = v25,
    NULL = v20
};


local l_Array_0 = require(script.Parent.Parent.Parent.LuauPolyfill).Array;
local l_devAssert_0 = require(script.Parent.Parent.jsutils.devAssert).devAssert;
local _ = require(script.Parent.Parent.language.source);
local _ = require(script.Parent.Parent.language.ast);
local v4 = require(script.Parent.Parent.language.parser);
local l_Kind_0 = require(script.Parent.Parent.language.kinds).Kind;
local l_parse_0 = v4.parse;
local l_assertValidSDL_0 = require(script.Parent.Parent.validation.validate).assertValidSDL;
local l_GraphQLSchema_0 = require(script.Parent.Parent.type.schema).GraphQLSchema;
local l_specifiedDirectives_0 = require(script.Parent.Parent.type.directives).specifiedDirectives;
local l_extendSchemaImpl_0 = require(script.Parent.extendSchema).extendSchemaImpl;
local function v21(v11, v12)
    local l_l_devAssert_0_0 = l_devAssert_0;
    local v14 = false;
    if v11 ~= nil then
        v14 = v11.kind == l_Kind_0.DOCUMENT;
    end;
    l_l_devAssert_0_0(v14, "Must provide valid Document AST.");
    if not ((not (v12 ~= nil) or v12.assumeValid) or v12.assumeValidSDL) then
        l_assertValidSDL_0(v11);
    end;
    v14 = l_extendSchemaImpl_0({
        description = nil,
        types = {},
        directives = {},
        extensions = nil,
        extensionASTNodes = {},
        assumeValid = false
    }, v11, v12);
    if v14.astNode == nil then
        for _, v16 in ipairs(v14.types) do
            if v16.name == "Query" then
                v14.query = v16;
            elseif v16.name == "Mutation" then
                v14.mutation = v16;
            elseif v16.name == "Subscription" then
                v14.subscription = v16;
            end;
        end;
    end;
    local l_directives_0 = v14.directives;
    for _, v19 in ipairs(l_specifiedDirectives_0) do
        if l_Array_0.every(l_directives_0, function(v20)
            return v20.name ~= v19.name;
        end) then
            table.insert(l_directives_0, v19);
        end;
    end;
    return l_GraphQLSchema_0.new(v14);
end;
return {
    buildASTSchema = v21,
    buildSchema = function(v22, v23)
        return v21(l_parse_0(v22, {
            noLocation = if not v23 then nil else v23.noLocation,
            experimentalFragmentVariables = if not v23 then nil else v23.experimentalFragmentVariables
        }), {
            assumeValidSDL = if not v23 then nil else v23.assumeValidSDL,
            assumeValid = if not v23 then nil else v23.assumeValid
        });
    end
};


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_jsutils_0 = l_Parent_0.jsutils;
local l_luaUtils_0 = l_Parent_0.luaUtils;
local v4 = require(l_Parent_1.LuauPolyfill);
local l_Array_0 = v4.Array;
local l_Object_0 = v4.Object;
local l_inspect_0 = require(l_jsutils_0.inspect).inspect;
local l_invariant_0 = require(l_jsutils_0.invariant).invariant;
local l_didYouMean_0 = require(l_jsutils_0.didYouMean).didYouMean;
local l_isObjectLike_0 = require(l_jsutils_0.isObjectLike).isObjectLike;
local l_suggestionList_0 = require(l_jsutils_0.suggestionList).suggestionList;
local l_printPathArray_0 = require(l_jsutils_0.printPathArray).printPathArray;
local l_addPath_0 = require(l_jsutils_0.Path).addPath;
local v14 = require(l_jsutils_0.instanceOf);
local v15 = require(l_luaUtils_0.null);
local v16 = require(l_luaUtils_0.isNillish);
local l_isNillish_0 = v16.isNillish;
local l_isNotNillish_0 = v16.isNotNillish;
local l_pathToArray_0 = require(l_jsutils_0.Path).pathToArray;
local l_isIteratableObject_0 = require(l_jsutils_0.isIteratableObject).isIteratableObject;
local l_GraphQLError_0 = require(l_Parent_0.error.GraphQLError).GraphQLError;
local v22 = require(l_Parent_0.type.definition);
local l_isLeafType_0 = v22.isLeafType;
local l_isInputObjectType_0 = v22.isInputObjectType;
local l_isListType_0 = v22.isListType;
local l_isNonNullType_0 = v22.isNonNullType;
local v27 = nil;
local v28 = nil;
local function v32(v29, v30, v31)
    return v27(v29, v30, v31 or v28);
end;
v28 = function(v33, v34, v35)
    local v36 = "Invalid value " .. l_inspect_0(v34);
    if #v33 > 0 then
        v36 = v36 .. " at \"value" .. l_printPathArray_0(v33) .. "\"";
    end;
    v35.message = v36 .. ": " .. v35.message;
    error(v35);
end;
v27 = function(v37, v38, v39, v40)
    if not l_isNonNullType_0(v38) then
        if not l_isNillish_0(v37) then
            if not l_isListType_0(v38) then
                if not l_isInputObjectType_0(v38) then
                    if not l_isLeafType_0(v38) then
                        l_invariant_0(false, "Unexpected input type: " .. l_inspect_0(v38));
                        return ;
                    else
                        local v41 = nil;
                        local l_status_0, l_result_0 = pcall(v38.parseValue, v38, v37);
                        if l_status_0 then
                            v41 = l_result_0;
                            if v41 == nil then
                                v39(l_pathToArray_0(v40), v37, l_GraphQLError_0.new(("Expected type \"%s\"."):format(v38.name)));
                            end;
                            return v41;
                        elseif not v14(l_result_0, l_GraphQLError_0) then
                            v39(l_pathToArray_0(v40), v37, l_GraphQLError_0.new("Expected type \"" .. v38.name .. "\". " .. l_result_0.message, nil, nil, nil, nil, l_result_0));
                            return ;
                        else
                            v39(l_pathToArray_0(v40), v37, l_result_0);
                            return ;
                        end;
                    end;
                elseif l_isObjectLike_0(v37) then
                    local v44 = {};
                    local v45 = v38:getFields();
                    for _, v47 in ipairs(v45:values()) do
                        local v48 = v37[v47.name];
                        if v48 == nil then
                            if v47.defaultValue ~= nil then
                                v44[v47.name] = v47.defaultValue;
                            elseif l_isNonNullType_0(v47.type) then
                                v39(l_pathToArray_0(v40), v37, l_GraphQLError_0.new("Field \"" .. v47.name .. "\" of required type \"" .. l_inspect_0(v47.type) .. "\" was not provided."));
                            end;
                        else
                            v44[v47.name] = v27(v48, v47.type, v39, l_addPath_0(v40, v47.name, v38.name));
                        end;
                    end;
                    for _, v50 in ipairs(l_Object_0.keys(v37)) do
                        if not v45:get(v50) then
                            v39(l_pathToArray_0(v40), v37, l_GraphQLError_0.new(("Field \"%s\" is not defined by type \"%s\".%s"):format(v50, v38.name, l_didYouMean_0((l_suggestionList_0(v50, v38:getFields():keys()))))));
                        end;
                    end;
                    return v44;
                else
                    v39(l_pathToArray_0(v40), v37, l_GraphQLError_0.new("Expected type \"" .. v38.name .. "\" to be an object."));
                    return ;
                end;
            else
                local l_ofType_0 = v38.ofType;
                if not l_isIteratableObject_0(v37) then
                    return {
                        v27(v37, l_ofType_0, v39, v40)
                    };
                else
                    return l_Array_0.from(v37, function(v52, v53)
                        return v27(v52, l_ofType_0, v39, (l_addPath_0(v40, v53, nil)));
                    end);
                end;
            end;
        else
            return v15;
        end;
    elseif not l_isNotNillish_0(v37) then
        v39(l_pathToArray_0(v40), v37, l_GraphQLError_0.new("Expected non-nullable type \"" .. l_inspect_0(v38) .. "\" not to be null."));
        return ;
    else
        return v27(v37, v38.ofType, v39, v40);
    end;
end;
return {
    coerceInputValue = v32
};


local l_Array_0 = require(script.Parent.Parent.Parent.LuauPolyfill).Array;
local _ = require(script.Parent.Parent.language.ast);
concatAST = function(v2)
    local v3 = {};
    for _, v5 in ipairs(v2) do
        v3 = l_Array_0.concat(v3, v5.definitions);
    end;
    return {
        kind = "Document",
        definitions = v3
    };
end;
return {
    concatAST = concatAST
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.LuauPolyfill);
local l_Array_0 = v1.Array;
local l_Error_0 = v1.Error;
local l_Map_0 = v1.Map;
local l_Object_0 = v1.Object;
local l_coerceToMap_0 = v1.coerceToMap;
local l_mapValueOrdered_0 = require(l_Parent_0.luaUtils.mapValueOrdered).mapValueOrdered;
local _ = require(l_Parent_0.luaUtils.null);
local l_jsutils_0 = l_Parent_0.jsutils;
local l_keyMap_0 = require(l_jsutils_0.keyMap).keyMap;
local l_inspect_0 = require(l_jsutils_0.inspect).inspect;
local l_devAssert_0 = require(l_jsutils_0.devAssert).devAssert;
local _ = require(l_jsutils_0.ObjMap);
local _ = require(l_Parent_0.language.ast);
local l_Kind_0 = require(l_Parent_0.language.kinds).Kind;
local v16 = require(l_Parent_0.language.predicates);
local l_isTypeDefinitionNode_0 = v16.isTypeDefinitionNode;
local l_isTypeExtensionNode_0 = v16.isTypeExtensionNode;
local l_assertValidSDLExtension_0 = require(l_Parent_0.validation.validate).assertValidSDLExtension;
local l_getDirectiveValues_0 = require(l_Parent_0.execution.values).getDirectiveValues;
local l_type_0 = l_Parent_0.type;
local v22 = require(l_type_0.schema);
local l_assertSchema_0 = v22.assertSchema;
local l_GraphQLSchema_0 = v22.GraphQLSchema;
local v25 = require(l_type_0.scalars);
local l_specifiedScalarTypes_0 = v25.specifiedScalarTypes;
local l_isSpecifiedScalarType_0 = v25.isSpecifiedScalarType;
local v28 = require(l_type_0.introspection);
local l_introspectionTypes_0 = v28.introspectionTypes;
local l_isIntrospectionType_0 = v28.isIntrospectionType;
local v31 = require(l_type_0.directives);
local l_GraphQLDirective_0 = v31.GraphQLDirective;
local l_GraphQLDeprecatedDirective_0 = v31.GraphQLDeprecatedDirective;
local l_GraphQLSpecifiedByDirective_0 = v31.GraphQLSpecifiedByDirective;
local v35 = require(l_type_0.definition);
local l_isScalarType_0 = v35.isScalarType;
local l_isObjectType_0 = v35.isObjectType;
local l_isInterfaceType_0 = v35.isInterfaceType;
local l_isUnionType_0 = v35.isUnionType;
local l_isListType_0 = v35.isListType;
local l_isNonNullType_0 = v35.isNonNullType;
local l_isEnumType_0 = v35.isEnumType;
local l_isInputObjectType_0 = v35.isInputObjectType;
local l_GraphQLList_0 = v35.GraphQLList;
local l_GraphQLNonNull_0 = v35.GraphQLNonNull;
local l_GraphQLScalarType_0 = v35.GraphQLScalarType;
local l_GraphQLObjectType_0 = v35.GraphQLObjectType;
local l_GraphQLInterfaceType_0 = v35.GraphQLInterfaceType;
local l_GraphQLUnionType_0 = v35.GraphQLUnionType;
local l_GraphQLEnumType_0 = v35.GraphQLEnumType;
local l_GraphQLInputObjectType_0 = v35.GraphQLInputObjectType;
local l_valueFromAST_0 = require(script.Parent.valueFromAST).valueFromAST;
local v53 = nil;
local v54 = nil;
local v55 = nil;
local function v61(v56, v57, v58)
    l_assertSchema_0(v56);
    local l_l_devAssert_0_0 = l_devAssert_0;
    local v60 = false;
    if v57 ~= nil then
        v60 = v57.kind == l_Kind_0.DOCUMENT;
    end;
    l_l_devAssert_0_0(v60, "Must provide valid Document AST.");
    if (v58 and v58.assumeValid) ~= true and (v58 and v58.assumeValidSDL) ~= true then
        l_assertValidSDLExtension_0(v57, v56);
    end;
    l_l_devAssert_0_0 = v56:toConfig();
    v60 = extendSchemaImpl(l_l_devAssert_0_0, v57, v58);
    if l_l_devAssert_0_0 == v60 then
        return v56;
    else
        return (l_GraphQLSchema_0.new(v60));
    end;
end;
extendSchemaImpl = function(v62, v63, v64)
    local v65 = {};
    local v66 = l_Map_0.new();
    local v67 = {};
    local v68 = nil;
    local v69 = {};
    for _, v71 in ipairs(v63.definitions) do
        if v71.kind == l_Kind_0.SCHEMA_DEFINITION then
            v68 = v71;
        elseif v71.kind == l_Kind_0.SCHEMA_EXTENSION then
            table.insert(v69, v71);
        elseif not l_isTypeDefinitionNode_0(v71) then
            if not l_isTypeExtensionNode_0(v71) then
                if v71.kind == l_Kind_0.DIRECTIVE_DEFINITION then
                    table.insert(v67, v71);
                end;
            else
                local l_value_0 = v71.name.value;
                local v73 = v66:get(l_value_0);
                v66:set(l_value_0, if not v73 then {
                    v71
                } else l_Array_0.concat(v73, {
                    v71
                }));
            end;
        else
            table.insert(v65, v71);
        end;
    end;
    if (((#v66:keys() == 0 and #v65 == 0) and #v67 == 0) and #v69 == 0) and v68 == nil then
        return v62;
    else
        local v74 = l_Map_0.new();
        local v75 = nil;
        local v76 = nil;
        local v77 = nil;
        local v78 = nil;
        local v79 = nil;
        local v80 = nil;
        local v81 = nil;
        local v82 = nil;
        local v83 = nil;
        local v84 = nil;
        local v85 = nil;
        local v86 = nil;
        local v87 = nil;
        local v88 = nil;
        local v89 = nil;
        local v90 = nil;
        local function v91(v92)
            if not l_isListType_0(v92) then
                if not l_isNonNullType_0(v92) then
                    return v75(v92);
                else
                    return l_GraphQLNonNull_0.new(v91(v92.ofType));
                end;
            else
                return l_GraphQLList_0.new(v91(v92.ofType));
            end;
        end;
        v75 = function(v93)
            return v74:get(v93.name);
        end;
        local function v96(v94)
            local v95 = v94:toConfig();
            return l_GraphQLDirective_0.new(l_Object_0.assign({}, v95, {
                args = l_mapValueOrdered_0(l_coerceToMap_0(v95.args), v76)
            }));
        end;
        local function v98(v97)
            if not l_isIntrospectionType_0(v97) and not l_isSpecifiedScalarType_0(v97) then
                if not l_isScalarType_0(v97) then
                    if not l_isObjectType_0(v97) then
                        if not l_isInterfaceType_0(v97) then
                            if not l_isUnionType_0(v97) then
                                if not l_isEnumType_0(v97) then
                                    if not l_isInputObjectType_0(v97) then
                                        assert(false, "Unexpected type: " .. l_inspect_0(v97));
                                        return ;
                                    else
                                        return v83(v97);
                                    end;
                                else
                                    return v82(v97);
                                end;
                            else
                                return v81(v97);
                            end;
                        else
                            return v80(v97);
                        end;
                    else
                        return v79(v97);
                    end;
                else
                    return v78(v97);
                end;
            else
                return v97;
            end;
        end;
        v83 = function(v99)
            local v100 = v99:toConfig();
            local v101 = v66[v100.name] or {};
            return l_GraphQLInputObjectType_0.new(l_Object_0.assign({}, v100, {
                fields = function()
                    return l_Map_0.new(l_Array_0.concat(l_mapValueOrdered_0(l_coerceToMap_0(v100.fields), function(v102)
                        return l_Object_0.assign({}, v102, {
                            type = v91(v102.type)
                        });
                    end):entries(), v84(v101):entries()));
                end,
                extensionASTNodes = l_Array_0.concat(v100.extensionASTNodes, v101)
            }));
        end;
        v82 = function(v103)
            local v104 = v103:toConfig();
            local v105 = v66:get(v103.name) or {};
            return l_GraphQLEnumType_0.new(l_Object_0.assign({}, v104, {
                values = l_Map_0.new(l_Array_0.concat(v104.values:entries(), v85(v105):entries())),
                extensionASTNodes = l_Array_0.concat(v104.extensionASTNodes, v105)
            }));
        end;
        v78 = function(v106)
            local v107 = v106:toConfig();
            local v108 = v66:get(v107.name) or {};
            local l_specifiedByUrl_0 = v107.specifiedByUrl;
            for _, v111 in ipairs(v108) do
                l_specifiedByUrl_0 = v55(v111) or l_specifiedByUrl_0;
            end;
            return l_GraphQLScalarType_0.new(l_Object_0.assign({}, v107, {
                specifiedByUrl = l_specifiedByUrl_0,
                extensionASTNodes = l_Array_0.concat(v107.extensionASTNodes, v108)
            }));
        end;
        v79 = function(v112)
            local v113 = v112:toConfig();
            local v114 = v66:get(v113.name) or {};
            return l_GraphQLObjectType_0.new(l_Object_0.assign({}, v113, {
                interfaces = function()
                    return l_Array_0.concat(l_Array_0.map(v112:getInterfaces(), v75), v86(v114));
                end,
                fields = function()
                    return l_Map_0.new(l_Array_0.concat(l_mapValueOrdered_0(l_coerceToMap_0(v113.fields), v77):entries(), v90(v114):entries()));
                end,
                extensionASTNodes = l_Array_0.concat(v113.extensionASTNodes, v114)
            }));
        end;
        v80 = function(v115)
            local v116 = v115:toConfig();
            local v117 = v66:get(v116.name) or {};
            return l_GraphQLInterfaceType_0.new(l_Object_0.assign({}, v116, {
                interfaces = function()
                    return l_Array_0.concat(l_Array_0.map(v115:getInterfaces(), v75), v86(v117));
                end,
                fields = function()
                    return l_Map_0.new(l_Array_0.concat(l_mapValueOrdered_0(l_coerceToMap_0(v116.fields), v77):entries(), v90(v117):entries()));
                end,
                extensionASTNodes = l_Array_0.concat(v116.extensionASTNodes, v117)
            }));
        end;
        v81 = function(v118)
            local v119 = v118:toConfig();
            local v120 = v66:get(v119.name) or {};
            return l_GraphQLUnionType_0.new(l_Object_0.assign({}, v119, {
                types = function()
                    return l_Array_0.concat(l_Array_0.map(v118:getTypes(), v75), v87(v120));
                end,
                extensionASTNodes = l_Array_0.concat(v119.extensionASTNodes, v120)
            }));
        end;
        v77 = function(v121)
            return l_Object_0.assign({}, v121, {
                type = v91(v121.type),
                args = if not v121.args then nil else l_mapValueOrdered_0(v121.args, v76)
            });
        end;
        v76 = function(v122)
            return l_Object_0.assign({}, v122, {
                type = v91(v122.type)
            });
        end;
        local function v130(v123)
            local v124 = {};
            for _, v126 in ipairs(v123) do
                local v127 = v126.operationTypes or {};
                for _, v129 in ipairs(v127) do
                    v124[v129.operation] = v88(v129.type);
                end;
            end;
            return v124;
        end;
        v88 = function(v131)
            local l_value_1 = v131.name.value;
            local v133 = v53[l_value_1] or v74[l_value_1];
            if v133 == nil then
                error(l_Error_0.new(("Unknown type: \"%s\"."):format(l_value_1)));
            end;
            return v133;
        end;
        local function v134(v135)
            if v135.kind == l_Kind_0.LIST_TYPE then
                return l_GraphQLList_0.new(v134(v135.type));
            elseif v135.kind == l_Kind_0.NON_NULL_TYPE then
                return l_GraphQLNonNull_0.new(v134(v135.type));
            else
                return v88(v135);
            end;
        end;
        local function v138(v136)
            return l_GraphQLDirective_0.new({
                name = v136.name.value,
                description = if not v136.description then nil else v136.description.value,
                locations = l_Array_0.map(v136.locations, function(v137)
                    return v137.value;
                end),
                isRepeatable = v136.repeatable,
                args = v89(v136.arguments),
                astNode = v136
            });
        end;
        v90 = function(v139)
            local v140 = l_Map_0.new();
            for _, v142 in ipairs(v139) do
                local v143 = if not v142.fields then {} else v142.fields;
                for _, v145 in ipairs(v143) do
                    v140:set(v145.name.value, {
                        type = v134(v145.type),
                        description = if not v145.description then nil else v145.description.value,
                        args = v89(v145.arguments),
                        deprecationReason = v54(v145),
                        astNode = v145
                    });
                end;
            end;
            return v140;
        end;
        v89 = function(v146)
            local v147 = v146 or {};
            local v148 = l_Map_0.new();
            for _, v150 in ipairs(v147) do
                local v151 = v134(v150.type);
                v148:set(v150.name.value, {
                    type = v151,
                    description = if not v150.description then nil else v150.description.value,
                    defaultValue = l_valueFromAST_0(v150.defaultValue, v151),
                    deprecationReason = v54(v150),
                    astNode = v150
                });
            end;
            return v148;
        end;
        v84 = function(v152)
            local v153 = l_Map_0.new();
            for _, v155 in ipairs(v152) do
                local v156 = if not v155.fields then {} else v155.fields;
                for _, v158 in ipairs(v156) do
                    local v159 = v134(v158.type);
                    v153:set(v158.name.value, {
                        type = v159,
                        description = if not v158.description then nil else v158.description.value,
                        defaultValue = l_valueFromAST_0(v158.defaultValue, v159),
                        deprecationReason = v54(v158),
                        astNode = v158
                    });
                end;
            end;
            return v153;
        end;
        v85 = function(v160)
            local v161 = l_Map_0.new();
            for _, v163 in ipairs(v160) do
                local v164 = if not v163.values then {} else v163.values;
                for _, v166 in ipairs(v164) do
                    v161:set(v166.name.value, {
                        description = if not v166.description then nil else v166.description.value,
                        deprecationReason = v54(v166),
                        astNode = v166
                    });
                end;
            end;
            return v161;
        end;
        v86 = function(v167)
            local v168 = {};
            for _, v170 in ipairs(v167) do
                if v170.interfaces then
                    for _, v172 in ipairs(v170.interfaces) do
                        table.insert(v168, (v88(v172)));
                    end;
                end;
            end;
            return v168;
        end;
        v87 = function(v173)
            local v174 = {};
            for _, v176 in ipairs(v173) do
                if v176.types then
                    for _, v178 in ipairs(v176.types) do
                        table.insert(v174, (v88(v178)));
                    end;
                end;
            end;
            return v174;
        end;
        local function v187(v179)
            local l_value_2 = v179.name.value;
            local v181 = v66[l_value_2] or {};
            local l_kind_0 = v179.kind;
            if l_kind_0 == l_Kind_0.OBJECT_TYPE_DEFINITION then
                local v183 = l_Array_0.concat(v179, v181);
                return l_GraphQLObjectType_0.new({
                    name = l_value_2,
                    description = if not v179.description then nil else v179.description.value,
                    interfaces = function()
                        return v86(v183);
                    end,
                    fields = function()
                        return v90(v183);
                    end,
                    astNode = v179,
                    extensionASTNodes = v181
                });
            elseif l_kind_0 == l_Kind_0.INTERFACE_TYPE_DEFINITION then
                local v184 = l_Array_0.concat(v179, v181);
                return l_GraphQLInterfaceType_0.new({
                    name = l_value_2,
                    description = if not v179.description then nil else v179.description.value,
                    interfaces = function()
                        return v86(v184);
                    end,
                    fields = function()
                        return v90(v184);
                    end,
                    astNode = v179,
                    extensionASTNodes = v181
                });
            elseif l_kind_0 == l_Kind_0.ENUM_TYPE_DEFINITION then
                return l_GraphQLEnumType_0.new({
                    name = l_value_2,
                    description = if not v179.description then nil else v179.description.value,
                    values = v85((l_Array_0.concat(v179, v181))),
                    astNode = v179,
                    extensionASTNodes = v181
                });
            elseif l_kind_0 == l_Kind_0.UNION_TYPE_DEFINITION then
                local v185 = l_Array_0.concat(v179, v181);
                return l_GraphQLUnionType_0.new({
                    name = l_value_2,
                    description = if not v179.description then nil else v179.description.value,
                    types = function()
                        return v87(v185);
                    end,
                    astNode = v179,
                    extensionASTNodes = v181
                });
            elseif l_kind_0 == l_Kind_0.SCALAR_TYPE_DEFINITION then
                return l_GraphQLScalarType_0.new({
                    name = l_value_2,
                    description = if not v179.description then nil else v179.description.value,
                    specifiedByUrl = v55(v179),
                    astNode = v179,
                    extensionASTNodes = v181
                });
            elseif l_kind_0 == l_Kind_0.INPUT_OBJECT_TYPE_DEFINITION then
                local v186 = l_Array_0.concat(v179, v181);
                return l_GraphQLInputObjectType_0.new({
                    name = l_value_2,
                    description = if not v179.description then nil else v179.description.value,
                    fields = function()
                        return v84(v186);
                    end,
                    astNode = v179,
                    extensionASTNodes = v181
                });
            else
                assert(false, "Unexpected type definition node: " .. l_inspect_0(v179));
                return ;
            end;
        end;
        for _, v189 in ipairs(v62.types) do
            v74:set(v189.name, v98(v189));
        end;
        for _, v191 in ipairs(v65) do
            local l_value_3 = v191.name.value;
            v74:set(l_value_3, v53[l_value_3] or v187(v191));
        end;
        local v193 = l_Object_0.assign({}, {
            query = v62.query and v75(v62.query),
            mutation = v62.mutation and v75(v62.mutation),
            subscription = v62.subscription and v75(v62.subscription)
        }, not not v68 and v130({
            v68
        }) or {}, (v130(v69)));
        local v194 = nil;
        if v68 ~= nil and v68.description ~= nil then
            v194 = v68.description.value;
        end;
        local v195 = false;
        if v64 ~= nil and v64.assumeValid ~= nil then
            v195 = v64.assumeValid;
        end;
        local v196 = l_Object_0.assign({}, {
            description = v194
        }, v193, {
            types = v74:values(),
            directives = l_Array_0.concat(l_Array_0.map(v62.directives, v96), l_Array_0.map(v67, v138)),
            astNode = v68 or v62.astNode,
            extensionASTNodes = l_Array_0.concat(v62.extensionASTNodes, v69),
            assumeValid = v195
        });
        v196.extensions = nil;
        return v196;
    end;
end;
v53 = l_keyMap_0(l_Array_0.concat(l_specifiedScalarTypes_0, l_introspectionTypes_0), function(v197)
    return v197.name;
end);
v54 = function(v198)
    local v199 = l_getDirectiveValues_0(l_GraphQLDeprecatedDirective_0, v198);
    return v199 and v199.reason;
end;
v55 = function(v200)
    local v201 = l_getDirectiveValues_0(l_GraphQLSpecifiedByDirective_0, v200);
    return v201 and v201.url;
end;
return {
    extendSchema = v61,
    extendSchemaImpl = extendSchemaImpl
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.LuauPolyfill);
local l_Array_0 = v1.Array;
local l_Object_0 = v1.Object;
local l_keyMapOrdered_0 = require(l_Parent_0.luaUtils.keyMapOrdered).keyMapOrdered;
local l_jsutils_0 = l_Parent_0.jsutils;
local l_inspect_0 = require(l_jsutils_0.inspect).inspect;
local l_invariant_0 = require(l_jsutils_0.invariant).invariant;
local l_naturalCompare_0 = require(l_jsutils_0.naturalCompare).naturalCompare;
local l_language_0 = l_Parent_0.language;
local l_print_0 = require(l_language_0.printer).print;
local l_visit_0 = require(l_language_0.visitor).visit;
local _ = require(l_language_0.ast);
local l_type_0 = l_Parent_0.type;
local _ = require(l_type_0.schema);
local v15 = require(l_type_0.definition);
local l_isSpecifiedScalarType_0 = require(l_type_0.scalars).isSpecifiedScalarType;
local l_isScalarType_0 = v15.isScalarType;
local l_isObjectType_0 = v15.isObjectType;
local l_isInterfaceType_0 = v15.isInterfaceType;
local l_isUnionType_0 = v15.isUnionType;
local l_isEnumType_0 = v15.isEnumType;
local l_isInputObjectType_0 = v15.isInputObjectType;
local l_isNonNullType_0 = v15.isNonNullType;
local l_isListType_0 = v15.isListType;
local l_isNamedType_0 = v15.isNamedType;
local l_isRequiredArgument_0 = v15.isRequiredArgument;
local l_isRequiredInputField_0 = v15.isRequiredInputField;
local l_astFromValue_0 = require(script.Parent.astFromValue).astFromValue;
local v29 = nil;
local v30 = nil;
local v31 = nil;
local v32 = nil;
local v33 = nil;
local v34 = nil;
local v35 = nil;
local v36 = nil;
local v37 = nil;
local v38 = nil;
local v39 = nil;
local v40 = nil;
local v41 = nil;
local v42 = nil;
local v43 = l_Object_0.freeze({
    TYPE_REMOVED = "TYPE_REMOVED",
    TYPE_CHANGED_KIND = "TYPE_CHANGED_KIND",
    TYPE_REMOVED_FROM_UNION = "TYPE_REMOVED_FROM_UNION",
    VALUE_REMOVED_FROM_ENUM = "VALUE_REMOVED_FROM_ENUM",
    REQUIRED_INPUT_FIELD_ADDED = "REQUIRED_INPUT_FIELD_ADDED",
    IMPLEMENTED_INTERFACE_REMOVED = "IMPLEMENTED_INTERFACE_REMOVED",
    FIELD_REMOVED = "FIELD_REMOVED",
    FIELD_CHANGED_KIND = "FIELD_CHANGED_KIND",
    REQUIRED_ARG_ADDED = "REQUIRED_ARG_ADDED",
    ARG_REMOVED = "ARG_REMOVED",
    ARG_CHANGED_KIND = "ARG_CHANGED_KIND",
    DIRECTIVE_REMOVED = "DIRECTIVE_REMOVED",
    DIRECTIVE_ARG_REMOVED = "DIRECTIVE_ARG_REMOVED",
    REQUIRED_DIRECTIVE_ARG_ADDED = "REQUIRED_DIRECTIVE_ARG_ADDED",
    DIRECTIVE_REPEATABLE_REMOVED = "DIRECTIVE_REPEATABLE_REMOVED",
    DIRECTIVE_LOCATION_REMOVED = "DIRECTIVE_LOCATION_REMOVED"
});
local v44 = l_Object_0.freeze({
    VALUE_ADDED_TO_ENUM = "VALUE_ADDED_TO_ENUM",
    TYPE_ADDED_TO_UNION = "TYPE_ADDED_TO_UNION",
    OPTIONAL_INPUT_FIELD_ADDED = "OPTIONAL_INPUT_FIELD_ADDED",
    OPTIONAL_ARG_ADDED = "OPTIONAL_ARG_ADDED",
    IMPLEMENTED_INTERFACE_ADDED = "IMPLEMENTED_INTERFACE_ADDED",
    ARG_DEFAULT_VALUE_CHANGE = "ARG_DEFAULT_VALUE_CHANGE"
});
local function v48(v45, v46)
    return (l_Array_0.filter(v29(v45, v46), function(v47)
        return v43[v47.type] ~= nil;
    end));
end;
local function v52(v49, v50)
    return (l_Array_0.filter(v29(v49, v50), function(v51)
        return v44[v51.type] ~= nil;
    end));
end;
v29 = function(v53, v54)
    return l_Array_0.concat(v30(v53, v54), v31(v53, v54));
end;
v31 = function(v55, v56)
    local v57 = {};
    local v58 = v32(v55:getDirectives(), v56:getDirectives());
    for _, v60 in ipairs(v58.removed) do
        table.insert(v57, {
            type = v43.DIRECTIVE_REMOVED,
            description = ("%s was removed."):format(v60.name)
        });
    end;
    for _, v62 in ipairs(v58.persisted) do
        local v63 = v62[1];
        local v64 = v62[2];
        local v65 = v32(v63.args, v64.args);
        for _, v67 in ipairs(v65.added) do
            if l_isRequiredArgument_0(v67) then
                table.insert(v57, {
                    type = v43.REQUIRED_DIRECTIVE_ARG_ADDED,
                    description = ("A required arg %s on directive %s was added."):format(v67.name, v63.name)
                });
            end;
        end;
        for _, v69 in ipairs(v65.removed) do
            table.insert(v57, {
                type = v43.DIRECTIVE_ARG_REMOVED,
                description = ("%s was removed from %s."):format(v69.name, v63.name)
            });
        end;
        if not (not v63.isRepeatable or v64.isRepeatable) then
            table.insert(v57, {
                type = v43.DIRECTIVE_REPEATABLE_REMOVED,
                description = ("Repeatable flag was removed from %s."):format(v63.name)
            });
        end;
        for _, v71 in ipairs(v63.locations) do
            if table.find(v64.locations, v71) == nil then
                table.insert(v57, {
                    type = v43.DIRECTIVE_LOCATION_REMOVED,
                    description = ("%s was removed from %s."):format(v71, v63.name)
                });
            end;
        end;
    end;
    return v57;
end;
v30 = function(v72, v73)
    local v74 = {};
    local v75 = v32(v72:getTypeMap():values(), v73:getTypeMap():values());
    for _, v77 in ipairs(v75.removed) do
        table.insert(v74, {
            type = v43.TYPE_REMOVED,
            description = not not l_isSpecifiedScalarType_0(v77) and ("Standard scalar %s was removed because it is not referenced anymore."):format(v77.name) or ("%s was removed."):format(v77.name)
        });
    end;
    for _, v79 in ipairs(v75.persisted) do
        local v80 = v79[1];
        local v81 = v79[2];
        if not l_isEnumType_0(v80) or not l_isEnumType_0(v81) then
            if not l_isUnionType_0(v80) or not l_isUnionType_0(v81) then
                if not l_isInputObjectType_0(v80) or not l_isInputObjectType_0(v81) then
                    if not l_isObjectType_0(v80) or not l_isObjectType_0(v81) then
                        if not l_isInterfaceType_0(v80) or not l_isInterfaceType_0(v81) then
                            if v80.new ~= v81.new then
                                table.insert(v74, {
                                    type = v43.TYPE_CHANGED_KIND,
                                    description = ("%s changed from %s to %s."):format(v80.name, v38(v80), v38(v81))
                                });
                            end;
                        else
                            for _, v83 in ipairs(l_Array_0.concat(v36(v80, v81), v37(v80, v81))) do
                                table.insert(v74, v83);
                            end;
                        end;
                    else
                        for _, v85 in ipairs(l_Array_0.concat(v36(v80, v81), v37(v80, v81))) do
                            table.insert(v74, v85);
                        end;
                    end;
                else
                    for _, v87 in ipairs(v35(v80, v81)) do
                        table.insert(v74, v87);
                    end;
                end;
            else
                for _, v89 in ipairs(v34(v80, v81)) do
                    table.insert(v74, v89);
                end;
            end;
        else
            for _, v91 in ipairs(v33(v80, v81)) do
                table.insert(v74, v91);
            end;
        end;
    end;
    return v74;
end;
v35 = function(v92, v93)
    local v94 = {};
    local v95 = v32(v92:getFields():values(), v93:getFields():values());
    for _, v97 in ipairs(v95.added) do
        if not l_isRequiredInputField_0(v97) then
            table.insert(v94, {
                type = v44.OPTIONAL_INPUT_FIELD_ADDED,
                description = ("An optional field %s on input type %s was added."):format(v97.name, v92.name)
            });
        else
            table.insert(v94, {
                type = v43.REQUIRED_INPUT_FIELD_ADDED,
                description = ("A required field %s on input type %s was added."):format(v97.name, v92.name)
            });
        end;
    end;
    for _, v99 in ipairs(v95.removed) do
        table.insert(v94, {
            type = v43.FIELD_REMOVED,
            description = ("%s.%s was removed."):format(v92.name, v99.name)
        });
    end;
    for _, v101 in ipairs(v95.persisted) do
        local v102 = v101[1];
        local v103 = v101[2];
        if not v39(v102.type, v103.type) then
            table.insert(v94, {
                type = v43.FIELD_CHANGED_KIND,
                description = ("%s.%s changed type from %s to %s."):format(v92.name, v102.name, tostring(v102.type), (tostring(v103.type)))
            });
        end;
    end;
    return v94;
end;
v34 = function(v104, v105)
    local v106 = {};
    local v107 = v32(v104:getTypes(), v105:getTypes());
    for _, v109 in ipairs(v107.added) do
        table.insert(v106, {
            type = v44.TYPE_ADDED_TO_UNION,
            description = ("%s was added to union type %s."):format(v109.name, v104.name)
        });
    end;
    for _, v111 in ipairs(v107.removed) do
        table.insert(v106, {
            type = v43.TYPE_REMOVED_FROM_UNION,
            description = ("%s was removed from union type %s."):format(v111.name, v104.name)
        });
    end;
    return v106;
end;
v33 = function(v112, v113)
    local v114 = {};
    local v115 = v32(v112:getValues(), v113:getValues());
    for _, v117 in ipairs(v115.added) do
        table.insert(v114, {
            type = v44.VALUE_ADDED_TO_ENUM,
            description = ("%s was added to enum type %s."):format(v117.name, v112.name)
        });
    end;
    for _, v119 in ipairs(v115.removed) do
        table.insert(v114, {
            type = v43.VALUE_REMOVED_FROM_ENUM,
            description = ("%s was removed from enum type %s."):format(v119.name, v112.name)
        });
    end;
    return v114;
end;
v37 = function(v120, v121)
    local v122 = {};
    local v123 = v32(v120:getInterfaces(), v121:getInterfaces());
    for _, v125 in ipairs(v123.added) do
        table.insert(v122, {
            type = v44.IMPLEMENTED_INTERFACE_ADDED,
            description = ("%s added to interfaces implemented by %s."):format(v125.name, v120.name)
        });
    end;
    for _, v127 in ipairs(v123.removed) do
        table.insert(v122, {
            type = v43.IMPLEMENTED_INTERFACE_REMOVED,
            description = ("%s no longer implements interface %s."):format(v120.name, v127.name)
        });
    end;
    return v122;
end;
v36 = function(v128, v129)
    local v130 = {};
    local v131 = v32(v128:getFields():values(), v129:getFields():values());
    for _, v133 in ipairs(v131.removed) do
        table.insert(v130, {
            type = v43.FIELD_REMOVED,
            description = ("%s.%s was removed."):format(v128.name, v133.name)
        });
    end;
    for _, v135 in ipairs(v131.persisted) do
        local v136 = v135[1];
        local v137 = v135[2];
        for _, v139 in ipairs(v40(v128, v136, v137)) do
            table.insert(v130, v139);
        end;
        if not v41(v136.type, v137.type) then
            table.insert(v130, {
                type = v43.FIELD_CHANGED_KIND,
                description = ("%s.%s changed type from "):format(v128.name, v136.name) .. ("%s to %s."):format(tostring(v136.type), (tostring(v137.type)))
            });
        end;
    end;
    return v130;
end;
v40 = function(v140, v141, v142)
    local v143 = {};
    local v144 = v32(v141.args, v142.args);
    for _, v146 in ipairs(v144.removed) do
        table.insert(v143, {
            type = v43.ARG_REMOVED,
            description = ("%s.%s arg %s was removed."):format(v140.name, v141.name, v146.name)
        });
    end;
    for _, v148 in ipairs(v144.persisted) do
        local v149 = v148[1];
        local v150 = v148[2];
        if v39(v149.type, v150.type) then
            if v149.defaultValue ~= nil then
                if v150.defaultValue == nil then
                    table.insert(v143, {
                        type = v44.ARG_DEFAULT_VALUE_CHANGE,
                        description = ("%s.%s arg %s defaultValue was removed."):format(v140.name, v141.name, v149.name)
                    });
                else
                    local v151 = v42(v149.defaultValue, v149.type);
                    local v152 = v42(v150.defaultValue, v150.type);
                    if v151 ~= v152 then
                        table.insert(v143, {
                            type = v44.ARG_DEFAULT_VALUE_CHANGE,
                            description = ("%s.%s arg %s has changed defaultValue from %s to %s."):format(v140.name, v141.name, v149.name, v151, v152)
                        });
                    end;
                end;
            end;
        else
            table.insert(v143, {
                type = v43.ARG_CHANGED_KIND,
                description = ("%s.%s arg %s has changed type from "):format(v140.name, v141.name, v149.name) .. ("%s to %s."):format(tostring(v149.type), (tostring(v150.type)))
            });
        end;
    end;
    for _, v154 in ipairs(v144.added) do
        if not l_isRequiredArgument_0(v154) then
            table.insert(v143, {
                type = v44.OPTIONAL_ARG_ADDED,
                description = ("An optional arg %s on %s.%s was added."):format(v154.name, v140.name, v141.name)
            });
        else
            table.insert(v143, {
                type = v43.REQUIRED_ARG_ADDED,
                description = ("A required arg %s on %s.%s was added."):format(v154.name, v140.name, v141.name)
            });
        end;
    end;
    return v143;
end;
v41 = function(v155, v156)
    if not l_isListType_0(v155) then
        if not l_isNonNullType_0(v155) then
            local v157;
            if l_isNamedType_0(v156) then
                v157 = true;
                if not (v155.name ~= v156.name) then
                    goto label0;
                end;
            end;
            v157 = l_isNonNullType_0(v156) and v41(v155, v156.ofType);
            ::label0::;
            return v157;
        else
            return l_isNonNullType_0(v156) and v41(v155.ofType, v156.ofType);
        end;
    else
        return not not l_isListType_0(v156) and v41(v155.ofType, v156.ofType) or l_isNonNullType_0(v156) and v41(v155, v156.ofType);
    end;
end;
v39 = function(v158, v159)
    if not l_isListType_0(v158) then
        if not l_isNonNullType_0(v158) then
            return l_isNamedType_0(v159) and v158.name == v159.name;
        else
            return not not l_isNonNullType_0(v159) and v39(v158.ofType, v159.ofType) or not l_isNonNullType_0(v159) and v39(v158.ofType, v159);
        end;
    else
        return l_isListType_0(v159) and v39(v158.ofType, v159.ofType);
    end;
end;
v38 = function(v160)
    if not l_isScalarType_0(v160) then
        if not l_isObjectType_0(v160) then
            if not l_isInterfaceType_0(v160) then
                if not l_isUnionType_0(v160) then
                    if not l_isEnumType_0(v160) then
                        if not l_isInputObjectType_0(v160) then
                            l_invariant_0(false, "Unexpected type: " .. l_inspect_0(v160));
                            return "";
                        else
                            return "an Input type";
                        end;
                    else
                        return "an Enum type";
                    end;
                else
                    return "a Union type";
                end;
            else
                return "an Interface type";
            end;
        else
            return "an Object type";
        end;
    else
        return "a Scalar type";
    end;
end;
v42 = function(v161, v162)
    local v163 = l_astFromValue_0(v161, v162);
    l_invariant_0(v163 ~= nil);
    return l_print_0((l_visit_0(v163, {
        ObjectValue = function(_, v165)
            local v166 = l_Array_0.concat({}, v165.fields);
            l_Array_0.sort(v166, function(v167, v168)
                return l_naturalCompare_0(v167.name.value, v168.name.value);
            end);
            return l_Object_0.assign({}, v165, {
                fields = v166
            });
        end
    })));
end;
v32 = function(v169, v170)
    local v171 = {};
    local v172 = {};
    local v173 = {};
    local v175 = l_keyMapOrdered_0(v169, function(v174)
        return v174.name;
    end);
    local v177 = l_keyMapOrdered_0(v170, function(v176)
        return v176.name;
    end);
    for _, v179 in ipairs(v169) do
        local v180 = v177:get(v179.name);
        if v180 == nil then
            table.insert(v172, v179);
        else
            table.insert(v173, {
                v179,
                v180
            });
        end;
    end;
    for _, v182 in ipairs(v170) do
        if v175:get(v182.name) == nil then
            table.insert(v171, v182);
        end;
    end;
    return {
        added = v171,
        persisted = v173,
        removed = v172
    };
end;
return {
    BreakingChangeType = v43,
    DangerousChangeType = v44,
    findBreakingChanges = v48,
    findDangerousChanges = v52
};


local l_Object_0 = require(script.Parent.Parent.Parent.LuauPolyfill).Object;
local _ = require(script.Parent.Parent.language.directiveLocation);
getIntrospectionQuery = function(v2)
    local v3 = l_Object_0.assign({
        descriptions = true,
        specifiedByUrl = false,
        directiveIsRepeatable = false,
        schemaDescription = false,
        inputValueDeprecation = false
    }, v2);
    local v4 = not v3.descriptions and "" or "description";
    local v5 = not v3.specifiedByUrl and "" or "specifiedByUrl";
    local v6 = not v3.directiveIsRepeatable and "" or "isRepeatable";
    local v7 = not v3.schemaDescription and "" or v4;
    local function _(v8)
        if not v3.inputValueDeprecation then
            return "";
        else
            return v8;
        end;
    end;
    return ("\n    query IntrospectionQuery {\n      __schema {\n        %s\n        queryType { name }\n        mutationType { name }\n        subscriptionType { name }\n        types {\n          ...FullType\n        }\n        directives {\n          name\n          %s\n          %s\n          locations\n          args%s {\n            ...InputValue\n          }\n        }\n      }\n    }\n\n    fragment FullType on __Type {\n      kind\n      name\n      %s\n      %s\n      fields(includeDeprecated: true) {\n        name\n        %s\n        args%s {\n          ...InputValue\n        }\n        type {\n          ...TypeRef\n        }\n        isDeprecated\n        deprecationReason\n      }\n      inputFields%s {\n        ...InputValue\n      }\n      interfaces {\n        ...TypeRef\n      }\n      enumValues(includeDeprecated: true) {\n        name\n        %s\n        isDeprecated\n        deprecationReason\n      }\n      possibleTypes {\n        ...TypeRef\n      }\n    }\n\n    fragment InputValue on __InputValue {\n      name\n      %s\n      type { ...TypeRef }\n      defaultValue\n      %s\n      %s\n    }\n\n    fragment TypeRef on __Type {\n      kind\n      name\n      ofType {\n        kind\n        name\n        ofType {\n          kind\n          name\n          ofType {\n            kind\n            name\n            ofType {\n              kind\n              name\n              ofType {\n                kind\n                name\n                ofType {\n                  kind\n                  name\n                  ofType {\n                    kind\n                    name\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  "):format(v7, v4, v6, not v3.inputValueDeprecation and "" or "(includeDeprecated: true)", v4, v5, v4, not v3.inputValueDeprecation and "" or "(includeDeprecated: true)", not v3.inputValueDeprecation and "" or "(includeDeprecated: true)", v4, v4, not v3.inputValueDeprecation and "" or "isDeprecated", not v3.inputValueDeprecation and "" or "deprecationReason");
end;
return {
    getIntrospectionQuery = getIntrospectionQuery
};


local _ = require(script.Parent.Parent.language.ast);
local l_Kind_0 = require(script.Parent.Parent.language.kinds).Kind;
return {
    getOperationAST = function(v2, v3)
        local v4 = nil;
        for _, v6 in pairs(v2.definitions) do
            if v6.kind == l_Kind_0.OPERATION_DEFINITION then
                if v3 == nil then
                    if not v4 then
                        v4 = v6;
                    else
                        return nil;
                    end;
                elseif v6.name and v6.name.value == v3 then
                    return v6;
                end;
            end;
        end;
        return v4;
    end
};


local l_GraphQLError_0 = require(script.Parent.Parent.error.GraphQLError).GraphQLError;
local _ = require(script.Parent.Parent.language.ast);
local _ = require(script.Parent.Parent.type.definition);
local _ = require(script.Parent.Parent.type.schema);
return {
    getOperationRootType = function(v4, v5)
        if v5.operation == "query" then
            local v6 = v4:getQueryType();
            if not v6 then
                error(l_GraphQLError_0.new("Schema does not define the required query root type.", v5));
            end;
            return v6;
        elseif v5.operation == "mutation" then
            local v7 = v4:getMutationType();
            if not v7 then
                error(l_GraphQLError_0.new("Schema is not configured for mutations.", v5));
            end;
            return v7;
        elseif v5.operation == "subscription" then
            local v8 = v4:getSubscriptionType();
            if not v8 then
                error(l_GraphQLError_0.new("Schema is not configured for subscriptions.", v5));
            end;
            return v8;
        else
            error(l_GraphQLError_0.new("Can only have query, mutation and subscription operations.", v5));
            return ;
        end;
    end
};


local v0 = require(script.getIntrospectionQuery);
local v1 = require(script.buildASTSchema);
local v2 = require(script.printSchema);
local v3 = require(script.TypeInfo);
local v4 = require(script.typeComparators);
local v5 = require(script.assertValidName);
local v6 = require(script.findBreakingChanges);
return {
    getIntrospectionQuery = v0.getIntrospectionQuery,
    getOperationAST = require(script.getOperationAST).getOperationAST,
    getOperationRootType = require(script.getOperationRootType).getOperationRootType,
    introspectionFromSchema = require(script.introspectionFromSchema).introspectionFromSchema,
    buildClientSchema = require(script.buildClientSchema).buildClientSchema,
    buildASTSchema = v1.buildASTSchema,
    buildSchema = v1.buildSchema,
    extendSchema = require(script.extendSchema).extendSchema,
    lexicographicSortSchema = require(script.lexicographicSortSchema).lexicographicSortSchema,
    printSchema = v2.printSchema,
    printType = v2.printType,
    printIntrospectionSchema = v2.printIntrospectionSchema,
    typeFromAST = require(script.typeFromAST).typeFromAST,
    valueFromAST = require(script.valueFromAST).valueFromAST,
    valueFromASTUntyped = require(script.valueFromASTUntyped).valueFromASTUntyped,
    astFromValue = require(script.astFromValue).astFromValue,
    TypeInfo = v3.TypeInfo,
    visitWithTypeInfo = v3.visitWithTypeInfo,
    coerceInputValue = require(script.coerceInputValue).coerceInputValue,
    concatAST = require(script.concatAST).concatAST,
    separateOperations = require(script.separateOperations).separateOperations,
    stripIgnoredCharacters = require(script.stripIgnoredCharacters).stripIgnoredCharacters,
    isEqualType = v4.isEqualType,
    isTypeSubTypeOf = v4.isTypeSubTypeOf,
    doTypesOverlap = v4.doTypesOverlap,
    assertValidName = v5.assertValidName,
    isValidNameError = v5.isValidNameError,
    BreakingChangeType = v6.BreakingChangeType,
    DangerousChangeType = v6.DangerousChangeType,
    findBreakingChanges = v6.findBreakingChanges,
    findDangerousChanges = v6.findDangerousChanges
};


local l_Parent_0 = script.Parent.Parent;
local l_Object_0 = require(l_Parent_0.Parent.LuauPolyfill).Object;
local l_invariant_0 = require(l_Parent_0.jsutils.invariant).invariant;
local _ = require(l_Parent_0.type.schema);
local l_parse_0 = require(l_Parent_0.language.parser).parse;
local l_executeSync_0 = require(l_Parent_0.execution.execute).executeSync;
local l_getIntrospectionQuery_0 = require(script.Parent.getIntrospectionQuery).getIntrospectionQuery;
return {
    introspectionFromSchema = function(v7, v8)
        local v9 = l_executeSync_0({
            schema = v7,
            document = l_parse_0(l_getIntrospectionQuery_0((l_Object_0.assign({
                specifiedByUrl = true,
                directiveIsRepeatable = true,
                schemaDescription = true,
                inputValueDeprecation = true
            }, v8))))
        });
        l_invariant_0(not v9.errors and v9.data);
        return v9.data;
    end
};