I just tried out two prisma examples, and in both,...
# orm-help
a
I just tried out two prisma examples, and in both, after I changed the database schema and ran
npx prisma introspect
and
npx prisma generate
, the
schema.graphql
file remained unchanged, even after trying also to run
npm run generate
. Is this intended behavior? The two examples I tried: https://github.com/prisma/prisma-examples/tree/master/typescript/graphql-nextjs and https://github.com/prisma/prisma-examples/tree/master/typescript/graphql-apollo-server
r
Hey @Alvin Khaled 👋 The
schema.graphql
has no relation to
prisma generate
. That file is used to create your GraphQL schema to expose to the client. So you would either have to create that yourself and write all the resolvers or use something like Nexus. Prisma is just a database querying tool so it wouldn't change your
schema.graphql
anyway.
a
Shouldn't the
npm run generate
(which includes running
ts-node --transpile-only src/schema
) update the
schema.graphql
file? Is there something else I've got to do to have Nexus Schema update it?
The examples I linked to use nexus-schema, but I'm not familiar (with any of this), so I'm not sure how to invoke it. The readmes only mention prisma commands