Files
klz-cables.com/.pnpm-store/v10/files/1d/de34cc1f5a30ebde92a87de80e9a6d88af05c3f5e3cce283a4054a0efe3b0ad0f4bdb344f93f5f0ea0a35ad500b0ac0ddff6e909f9d986608e68fe73f2348b
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

32 lines
1.0 KiB
Plaintext

import { invariant } from '../jsutils/invariant.mjs';
import { parse } from '../language/parser.mjs';
import { executeSync } from '../execution/execute.mjs';
import { getIntrospectionQuery } from './getIntrospectionQuery.mjs';
/**
* Build an IntrospectionQuery from a GraphQLSchema
*
* IntrospectionQuery is useful for utilities that care about type and field
* relationships, but do not need to traverse through those relationships.
*
* This is the inverse of buildClientSchema. The primary use case is outside
* of the server context, for instance when doing schema comparisons.
*/
export function introspectionFromSchema(schema, options) {
const optionsWithDefaults = {
specifiedByUrl: true,
directiveIsRepeatable: true,
schemaDescription: true,
inputValueDeprecation: true,
oneOf: true,
...options,
};
const document = parse(getIntrospectionQuery(optionsWithDefaults));
const result = executeSync({
schema,
document,
});
(!result.errors && result.data) || invariant(false);
return result.data;
}