-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
improvementUpgrade to the current codebaseUpgrade to the current codebase
Milestone
Description
I'd like to try out switch mongoose for Prisma, as it seems more suitable for GraphQL and honestly kinda dope.
After testing a few different librairies, here are my thoughts:
Stack tested
I tried simply using express + apollo server and a prisma ORM. DB in postgresql is quite easy with prisma, you basically just change the db URL. See references for a docker config.
Now I need to either pick and implement a backend using prisma, try something else or stick with mongoose + MongoDB.
Apollo Server (SDL-first)
Pros
- It will work
Cons
- You get one bigass
prisma.schemato define types, queries and mutations (didn't find a way not to) - Not code-first, which is more what I'm looking for
Nexus — Code-First
This one seems the most promising.
Pros
- Only functions and types
Cons
- Relies heavily on code generation
TypeGraphQL — Code-First
This will be plan B.
Pros
- Looks stable and easy to use
- As good guides with apollo typegraphql + prisma
Cons
- Uses classes for its type definitions (I'd like to stick with FP, at least within my codebase)
References
- https://www.prisma.io/apollo
- This page lists possible ways to use prisma, including the three I tested
- https://medium.com/geekculture/how-to-setup-full-stack-apollo-gql-codegen-prisma-2-0-typescript-react-part-1-the-backend-e9eae9518dc9
- https://github.com/arbytez/boilerplate-nexus-prisma-apollo-graphql-express
- https://medium.com/dooboolab/how-to-set-up-a-graphql-server-with-apollo-server-prisma2-and-nexus-schema-f59aa23b5d5d
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
improvementUpgrade to the current codebaseUpgrade to the current codebase
Type
Projects
Status
In Progress