The prisma-binding to SDL-first guide is missing really crucial info
See original GitHub issueHello,
While going through this page https://www.prisma.io/docs/guides/upgrade-guides/upgrade-from-prisma-1/upgrading-prisma-binding-to-sdl-first I had a few questions that nobody is answering on the Slack channel, here they are:
1- The first step requires that I download the full graphql schema from the graphql server. The confusion here is that this guide assumes that we have gone through multiple steps prior to that, like fixing schema incompatibilities. But if that step has already been done then there would be no running graphql server, so how exactly should we get the updated graphql schema?
2- The last step (section 4.2) says this:
You can also delete any remaining .js files, the schema.graphql and prisma.graphql files.
If I delete the schema.graphql file, then how would the server work?
const server = new GraphQLServer({
typeDefs: 'src/schema.graphql', // see this line ???
resolvers,
context: req => ({
...req,
prisma: new PrismaClient()
}),
I tried deleting it, but the grapqhl server won’t run in reality, and I don’t think it should be removed otherwise I’m missing something here.
3- If generated schema and application schema have been combined into one, then this means all operations supported will be exposed. Which introduces a lot of security issues that we never had to deal with. but like this we’re forced to. What should we do in this case?
4- After the upgrade is done, what is the recomeneded workflow? what are the required steps to add a new feature? Are we stuck with editing a 24k lines long file?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)

Top Related StackOverflow Question
In this case, “full schema” means: application schema where the imported types are already part of the schema as opposed to before where the application schema imported the types from the Prisma GraphQL schema. Does that make more sense?
Basically this is the schema before with
graphql-import:And this is the “full schema” without using
graphql-importthat you have to use with Prisma 2:Hey @omar-dulaimi, thanks a lot for raising these points! I’ll try to address them as good as possible but I’d also like to offer you to jump on a call to discuss this in person 🙂 I’ll reach out to you in a DM on Slack to coordinate this in case you’re interested!
Hmm, did you already shut down the GraphQL server that you had with Prisma 1? What’s needed here indeed is a GraphQL schema of your previous GraphQL server so that the same API can be replicated with Prisma 2.
Ha, thanks for catching this! I think this indeed a false instruction that wrongfully made it into this guide! I just removed it via this PR.
I’m not sure I can follow… can you elaborate what exactly you mean and maybe give an example? If you’re worried about authorization, then a library like
graphql-shieldmight be a good idea to include. However, if you didn’t use it in your setup before I don’t think it will be necessary now.Again I’m not fully sure what you mean, maybe you can elaborate? Generally, a workflow to add a feature would be:
I hope this helps already, but as I said I’ll reach out to you on Slack so that we can jump on a call and hopefully clarify these questions! 🙏