Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/apollo-server-core/dist/utils/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSchemaHash = void 0;
const language_1 = require("graphql/language");
const execution_1 = require("graphql/execution");
const utilities_1 = require("graphql/utilities");
const fast_json_stable_stringify_1 = __importDefault(require("fast-json-stable-stringify"));
const createSHA_1 = __importDefault(require("./createSHA"));
function generateSchemaHash(schema) {
const introspectionQuery = utilities_1.getIntrospectionQuery();
const documentAST = language_1.parse(introspectionQuery);
const result = execution_1.execute(schema, documentAST);
if (result &&
typeof result.then === 'function') {
throw new Error([
'The introspection query is resolving asynchronously; execution of an introspection query is not expected to return a `Promise`.',
'',
'Wrapped type resolvers should maintain the existing execution dynamics of the resolvers they wrap (i.e. async vs sync) or introspection types should be excluded from wrapping by checking them with `graphql/type`s, `isIntrospectionType` predicate function prior to wrapping.',
].join('\n'));
}
if (!result || !result.data || !result.data.__schema) {
throw new Error('Unable to generate server introspection document.');
}
const introspectionSchema = result.data.__schema;
const stringifiedSchema = fast_json_stable_stringify_1.default(introspectionSchema);
return createSHA_1.default('sha512')
.update(stringifiedSchema)
.digest('hex');
}
exports.generateSchemaHash = generateSchemaHash;
//# sourceMappingURL=schemaHash.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0345 ]-- |