From 69985a36555cfea9aa85f51df3f6e961e904e10e Mon Sep 17 00:00:00 2001 From: Vladimir Razuvaev Date: Wed, 9 Dec 2020 23:17:05 +0700 Subject: [PATCH] fix(gatsby): correct GraphQL warning text --- .../src/schema/extensions/__tests__/child-relations.js | 5 +++-- packages/gatsby/src/schema/schema.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/gatsby/src/schema/extensions/__tests__/child-relations.js b/packages/gatsby/src/schema/extensions/__tests__/child-relations.js index b63c8e25f0b79..39a21043da446 100644 --- a/packages/gatsby/src/schema/extensions/__tests__/child-relations.js +++ b/packages/gatsby/src/schema/extensions/__tests__/child-relations.js @@ -179,8 +179,9 @@ describe(`Define parent-child relationships with field extensions`, () => { `because type \`Child\` does not explicitly list type \`Parent\` in \`childOf\` extension.\n` + `Add the following type definition to fix this:\n\n` + ` type Child implements Node @childOf(types: ["Parent"]) {\n` + - ` id\n` + - ` }` + ` id: ID!\n` + + ` }\n\n` + + `https://www.gatsbyjs.com/docs/actions/#createTypes` ) }) diff --git a/packages/gatsby/src/schema/schema.js b/packages/gatsby/src/schema/schema.js index 6f811c8e0b3b3..04043dd7a38a0 100644 --- a/packages/gatsby/src/schema/schema.js +++ b/packages/gatsby/src/schema/schema.js @@ -1049,8 +1049,9 @@ const addImplicitConvenienceChildrenFields = ({ `type \`${typeName}\` does not explicitly list type \`${parentTypeName}\` in \`childOf\` extension.\n` + `Add the following type definition to fix this:\n\n` + ` type ${typeName} implements Node @childOf(types: ["${parentTypeName}"]${manyArg}) {\n` + - ` id\n` + - ` }` + ` id: ID!\n` + + ` }\n\n` + + `https://www.gatsbyjs.com/docs/actions/#createTypes` ) } }