From 289afcad4f8538c5c9ec114bde920ce57e18edb2 Mon Sep 17 00:00:00 2001 From: Stefano Cislaghi Date: Sun, 24 Nov 2024 17:44:12 +0000 Subject: [PATCH] feat: support for apollo server v4 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 127a7e4..d70d769 100644 --- a/src/index.js +++ b/src/index.js @@ -148,7 +148,7 @@ export const addMetadata = ({ } = {}) => { const { types = [], - } = (response?.data?.__schema || response?.__schema || {}) + } = (response?.data?.__schema || response?.__schema || response?.body?.singleResult?.data?.__schema || {}) // Go through all the types in the Introspection Query response and augment them types.forEach((type) => augmentType({ type, schemaMetadata }))