Current behavior
When moving the schema.graphql in the app project and adjust the schemaPath accordingly, it gets ignored when running yarn dev. The exception indicates that it still tries to fetch the now non-existing schema.graphql:
Error: No schema found for path: /Volumes/Data/projects/<myproject>/src/schema.graphql
at new GraphQLServer (/Volumes/Data/projects/<my-namespace>/<myproject>/node_modules/graphql-yoga/src/index.ts:62:17)
at Object.<anonymous> (/Volumes/Data/projects/<my-namespace>/<myproject>/src/index.ts:20:16)
at Module._compile (module.js:635:30)
at Module.m._compile (/Volumes/Data/projects/<my-namespace>/<myproject>/node_modules/ts-node/src/index.ts:422:23)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .ts] (/Volumes/Data/projects/<my-namespace>/<myproject>/node_modules/ts-node/src/index.ts:425:12)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
Reproduction
prisma init (environment prisma/1.1.3 (darwin-x64) node-v8.9.1)typescript-basic boilerplate.src/schema/index.graphqlprojects.app.schemaPath and point it to the new locationnpm run dev / yarn devExpected behavior?
Should use the new schema location.
That's the schemaPath in .graphqlconfig.yml, correct?
In the typescript boilerplate, the schema path is hardcoded:
const server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
context: req => ({
...req,
db: new Prisma({
endpoint: '__PRISMA_ENDPOINT__', // the endpoint of the Prisma DB service
secret: 'mysecret123', // specified in database/prisma.yml
debug: true, // log all GraphQL queries & mutations
}),
}),
})
You need to adjust the typeDefs property.
Ahhhh, my fault. Of course! :)
Not a bug, closing the issue.
Most helpful comment
Ahhhh, my fault. Of course! :)
Not a bug, closing the issue.