Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to utilise Apollo Server with Prisma 2/Nexus? #1367

Open
TheoMer opened this issue Aug 17, 2020 · 1 comment
Open

How to utilise Apollo Server with Prisma 2/Nexus? #1367

TheoMer opened this issue Aug 17, 2020 · 1 comment

Comments

@TheoMer
Copy link

TheoMer commented Aug 17, 2020

"nexus": "^0.26.0-next.3",
"nexus-plugin-prisma": "^0.16.1",
"ts-node": "^8.10.2",
"typescript": "^3.9.6",
"ts-node-dev": "^1.0.0-pre.50"
"apollo-server-express": "^2.9.14"

So I'm following verbatum (graphql.ts/nexus.graphql) the prisma-binding to Nexus documentation to migrate from Prisma 1 to 2, but wish to utilise my existing Apollo Server.

The Old to new Nexus documentation states:

With the new Nexus Framework, you don't need to create your GraphQLSchema instance manually any more as was done with makeSchema or makePrismaSchema before.

So what specific steps, in my instance, do I need to implement on Apollo Server to get it to work?

My current Apollo Server (Prisma 1 implementation) files are as follows:

  1. index.ts - https://gist.github.com/TheoMer/f931e0528efb878333d10a079cec1421
  2. createServer.ts - https://gist.github.com/TheoMer/a53e9734a5f3cb16dbaf8f1b1c653286
  3. db.ts - https://gist.github.com/TheoMer/fb0deb45805524b057583e92cf516db5
@jasonkuhrt
Copy link
Member

Apollo Server is bundled. If you were looking for engine settings follow https://github.com/graphql-nexus/nexus/pull/1388.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants