Open jasonkuhrt opened 4 years ago
I'd love to drop graphql-yoga and use the built in nexus server, however the current blocker is my lack of understanding how to use graphql-shield with nexus. General documentation for how to use different graphql middleware would be extremely useful here. Perhaps a plugin is required?
Currently the majority of examples in the prisma-examples repo use yoga so again guidance for migrating would be useful and help with adoption of nexus at this early stage.
I would like to see an example too
Please +1 the opening comment so that when we order issues by +1 to help prioritize this gets the right visibility. 🙏
I made this example, it doesn't cover transitioning to nexus server but would serve as a stepping stone for prisma1 users who might be upgrading https://github.com/homerjam/prisma2-example-yoga.
I think having understood everything a bit better now I might be able to change over using the docs here https://www.nexusjs.org/#/api/modules/main/exports/schema?id=middleware. Specifically I was thinking of the middleware being "Express style" and therefore applied to the server/router but actually it's applied to the schema (bit of a GraphQL noob over here).
I just created a plugin to use graphql-shield
on your nexus app to help migration from yoga (or other frameworks).
This was not the cleanest solution as we have to keep a dependency of graphql-middleware
but it works great with my project without any changes :)
What
Why
How
Migrate From...
?