From 0cc87580529964e1c2a00e0f0ac080cc537f7fe9 Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Sun, 24 Apr 2022 16:36:23 +0200 Subject: [PATCH] Add link to docs --- packages/internal/src/generate/graphqlSchema.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/internal/src/generate/graphqlSchema.ts b/packages/internal/src/generate/graphqlSchema.ts index 27b68fa17804..099ae88b18b0 100644 --- a/packages/internal/src/generate/graphqlSchema.ts +++ b/packages/internal/src/generate/graphqlSchema.ts @@ -6,6 +6,7 @@ import * as schemaAstPlugin from '@graphql-codegen/schema-ast' import { CodeFileLoader } from '@graphql-tools/code-file-loader' import { loadSchema, LoadSchemaOptions } from '@graphql-tools/load' import { DocumentNode, print } from 'graphql' +import terminalLink from 'terminal-link' import { rootSchema } from '@redwoodjs/graphql-server' @@ -69,9 +70,17 @@ export const generateGraphQLSchema = async () => { `It looks like you have a ${name} model in your database schema.` ) console.error( - 'Try running the generator you just used for that model first instead' + `Maybe you need to generate SDL or scaffolding for ${name} first.` ) + console.error('') } + + console.error( + `See the section on ${terminalLink( + 'troubleshooting generators', + 'https://redwoodjs.com/docs/schema-relations#troubleshooting-generators' + )} in our docs for more help` + ) } console.error('Schema loading failed', e)