Join Slack
Powered by
Hey, I have a question about setting up new projec...
# orm-help
s
sash
04/10/2020, 10:52 AM
Hey, I have a question about setting up new projects and defining schemas in v2, looking
https://github.com/prisma/prisma-examples/tree/master/javascript/graphql-apollo-server
it seems like the models are defined in 3 places?
schema.prisma
, `schema.graphql`and
schema.js
, in v1 it was possible to use a
graphql-schema
and reference the types from there, is that still the case in v2?
r
robertcooper
04/10/2020, 4:48 PM
This file is where you define your Prisma models:
https://github.com/prisma/prisma-examples/blob/master/javascript/graphql-apollo-server/prisma/schema.prisma
This file is where you define the API you want to expose (using nexus):
https://github.com/prisma/prisma-examples/blob/master/javascript/graphql-apollo-server/src/schema.js
This file is automatically generated by nexus when you start the server:
https://github.com/prisma/prisma-examples/blob/master/javascript/graphql-apollo-server/schema.graphql
s
sash
04/10/2020, 7:12 PM
Ah so nexus can help with boiler plate too?
4
Views
Open in Slack
Previous
Next