Skip to content

The prisma-binding to SDL-first guide is missing really crucial info #1367

@omar-dulaimi

Description

@omar-dulaimi

Hello,

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedProgress on this task is blocked (please provide details in the issue comment)type/docsDocumentation creation, updates or corrections

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions