From da0eaa45c6b191bdb468e4b3eaea4e789fc687f0 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Tue, 14 Jun 2022 10:25:58 -0700 Subject: [PATCH] fix(bug): Add optional chain for extensions --- packages/graphql/lib/utils/transform-schema.util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphql/lib/utils/transform-schema.util.ts b/packages/graphql/lib/utils/transform-schema.util.ts index 5a267417d..9a350fcc2 100644 --- a/packages/graphql/lib/utils/transform-schema.util.ts +++ b/packages/graphql/lib/utils/transform-schema.util.ts @@ -102,7 +102,7 @@ export function transformSchema( fields: () => replaceFields(config.fields), }); - if (type.extensions.apollo?.subgraph?.resolveReference) { + if (type.extensions?.apollo?.subgraph?.resolveReference) { objectType.extensions = { ...objectType.extensions, apollo: {