top | item 32863703

(no title)

nikolasburk | 3 years ago

Hey there, I'm Nikolas from the Prisma team. Just came here to quickly clarify this notion:

> Prisma is an API server that puts a GraphQL API in front of a DB.

Prisma is an ORM which generates a JavaScript/TypeScript client library for your database.

Your description is very true for Prisma 1 (which has been in maintenance mode for several years and is officially deprecated by now [1]), but the latest version(s) of Prisma (v2+) don't expose a GraphQL API any more. Prisma 1 also used GraphQL SDL for data modeling, the Prisma ORM on the other hand has its own, custom modeling language for describing database schemas in a declarative way and also comes with a flexible migration system.

That being said (and as Jens also mentioned elsewhere), the Prisma ORM does use GraphQL _internally_ as a wire protocol. However, as a developer, you _never_ touch this internal GraphQL layer and are not even supposed to be aware of it (you actually have to jump through a lot of hoops to even "find" it). It's also very likely that we'll replace GraphQL as a wire protocol in the future, so "GraphQL" really isn't something you should be thinking about as a developer who is using Prisma.

Hope that clarifies the situation a bit, let me know if you have any further questions around this topic.

[1] https://github.com/prisma/prisma1/issues/5208

discuss

order

searchableguy|3 years ago

Is there any post which goes into evolution of prisma from initial days of exposing graphql API directly to using it as wire protocol in the query engine?

And now the likely removal of graphql as wire protocol. What are the key reasons to remove the use of graphql query language?

nikolasburk|3 years ago

> Is there any post which goes into evolution of prisma from initial days of exposing graphql API directly to using it as wire protocol in the query engine?

To be honest, I think the most comprehensive resource for this is a Twitter thread [1] that I posted from my personal account that explains the different turns we took in the product direction :D

Otherwise, there's yhr blog post "How Prisma & GraphQL fit together" [2] that also touches on the same topics but might be a bit dated since it was published before we released the Prisma ORM for production use.

> And now the likely removal of graphql as wire protocol. What are the key reasons to remove the use of graphql query language?

The short answer is that it would allow us to make us more optimizations for the bridge between JS- and Rust-land in Prisma Client. However, this is not an urgent issue for us at the moment so very likely won't become a priority in the near/mid-term future.

[1] https://twitter.com/nikolasburk/status/1384908813069869058

[2] https://www.prisma.io/blog/prisma-and-graphql-mfl5y2r7t49c