Skip to content

Commit

Permalink
Add link to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Apr 24, 2022
1 parent a15561d commit 0cc8758
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/internal/src/generate/graphqlSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0cc8758

Please sign in to comment.