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

Migrate to Pothos #156

Merged
merged 1 commit into from
Jul 31, 2022
Merged

Migrate to Pothos #156

merged 1 commit into from
Jul 31, 2022

Conversation

huv1k
Copy link
Owner

@huv1k huv1k commented Jul 31, 2022

👋 Hey strangers,

this PR updates this template with a couple of changes.

Schema builder

I decided to switch to Pothos GraphQL instead of Nexus, because there is no future for nexus-prisma, so it doesn't make sense to keep it inside this template. @hayes is doing a great job with Pothos and everything about it is good 🙌

Move to JWT

I moved the session strategy to JWT so it's prepared for edge computing and Next.js middleware.

GraphQL server

I moved away from https://github.com/contra/graphql-helix and using directly https://github.com/dotansimha/graphql-yoga, which provides everything you need from a production-ready GraphQL server and it's lightweight.

New database

I decided to move to PlanetScale, they provide really generous free tier. They are a new cool kid in the block with database branching which is a perfect feature. If this doesn't suit, you can still you another database that Prisma supports.

Fixes

I fixed some problems with types and now it should work as expected. When JWT token is not presented, there is a fallback to userId and userRole. Fixes #29

@vercel
Copy link

vercel bot commented Jul 31, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nextjs-auth-prisma ✅ Ready (Inspect) Visit Preview Jul 31, 2022 at 3:50PM (UTC)

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

Successfully merging this pull request may close these issues.

Unhandled errors and wrong types in the context
1 participant