From 11b9887e4ef52b9c8cd0097f457d4a7ed08e4f3b Mon Sep 17 00:00:00 2001 From: Sean Grove Date: Thu, 11 Aug 2022 12:29:38 -0700 Subject: [PATCH] fix(graph): Support fragments on interfaces during codegen (#4925) * fix(graph): update graph codegen dep * fix: unnecessary eslint rule * chore: update contributors field Co-authored-by: sgrove Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- npm-shrinkwrap.json | 14 +++++++------- package.json | 2 +- tests/integration/530.graph-codegen.test.js | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c85f7bbfe8e..fd4c767c940 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -81,7 +81,7 @@ "multiparty": "^4.2.1", "netlify": "^12.0.0", "netlify-headers-parser": "^6.0.2", - "netlify-onegraph-internal": "0.8.1", + "netlify-onegraph-internal": "0.8.3", "netlify-redirect-parser": "^13.0.5", "netlify-redirector": "^0.2.1", "node-fetch": "^2.6.0", @@ -16319,9 +16319,9 @@ } }, "node_modules/netlify-onegraph-internal": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.1.tgz", - "integrity": "sha512-gCBwR6wOLWiiE+MMgYtx7OVIUvsNGPPP8oe0ltkYjCATcN/e/l0/z/FrRaTGPXnR8wMBp9Kibgibskr8h5dIpg==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.3.tgz", + "integrity": "sha512-qxdUkP6IcXUN/6FmYrfLM+M1pXK5TUTxkhhVKXHr+jpApFV4pmEsiuWU7jX4j4AqpaF7+glVJolyVD5F3SBpvg==", "dependencies": { "graphql": "16.5.0", "node-fetch": "^2.6.0", @@ -34795,9 +34795,9 @@ } }, "netlify-onegraph-internal": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.1.tgz", - "integrity": "sha512-gCBwR6wOLWiiE+MMgYtx7OVIUvsNGPPP8oe0ltkYjCATcN/e/l0/z/FrRaTGPXnR8wMBp9Kibgibskr8h5dIpg==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.3.tgz", + "integrity": "sha512-qxdUkP6IcXUN/6FmYrfLM+M1pXK5TUTxkhhVKXHr+jpApFV4pmEsiuWU7jX4j4AqpaF7+glVJolyVD5F3SBpvg==", "requires": { "graphql": "16.5.0", "node-fetch": "^2.6.0", diff --git a/package.json b/package.json index d2ceb508ba8..40152dff987 100644 --- a/package.json +++ b/package.json @@ -292,7 +292,7 @@ "multiparty": "^4.2.1", "netlify": "^12.0.0", "netlify-headers-parser": "^6.0.2", - "netlify-onegraph-internal": "0.8.1", + "netlify-onegraph-internal": "0.8.3", "netlify-redirect-parser": "^13.0.5", "netlify-redirector": "^0.2.1", "node-fetch": "^2.6.0", diff --git a/tests/integration/530.graph-codegen.test.js b/tests/integration/530.graph-codegen.test.js index 272446d4cb5..20d01c95195 100644 --- a/tests/integration/530.graph-codegen.test.js +++ b/tests/integration/530.graph-codegen.test.js @@ -7,6 +7,7 @@ const process = require('process') const test = require('ava') const { CodegenHelpers, GraphQL, IncludedCodegen, NetlifyGraph } = require('netlify-onegraph-internal') +const { registerConsole } = require('netlify-onegraph-internal/dist/internalConsole') const { generateHandlerSourceByOperationId, @@ -259,6 +260,8 @@ const builtInCodegenModules = IncludedCodegen.includedCodegenModules const queryWithFragmentOperationId = 'e2394c86-260c-4646-88df-7bc7370de666' builtInCodegenModules.forEach((codegenModule) => { + registerConsole(console) + testGenerateRuntime({ codegenModule, }) @@ -266,6 +269,8 @@ builtInCodegenModules.forEach((codegenModule) => { const subscriptionWithFragmentOperationId = 'e3d4bb8b-2fb5-9898-b051-db6027224112' builtInCodegenModules.forEach((codegenModule) => { + registerConsole(console) + codegenModule.generators.forEach((codegen) => { testGenerateHandlerSource({ codegenModule,