Graphcool-framework vs graphcool v1(beta) vs prisma?


#3

So is prisma docs ment for a self hosted graphql server that connects to graphcool generated database API?
And graphcool docs for connecting to a graphcool cloud?

image


#4

What has previously been called Graphcool 1.0 is Prisma. Graphcool 1.0 was a misnomer, causing a lot of confusion.


#5

So basically this means:
graphcool-framework and graphcool v1 beta are resolving into prisma cli?


#6

No.

  • Graphcool Framework is a backend solution including serverless functions. You can use the graphcool-framework CLI to set it up.

  • Prisma is an evolution of the query engine used in the Graphcool Framework to turn your Db into a GraphQL API, hence the previous name “Graphcool 1.0”, which has been replaced by “Prisma” to make the distinction clear. You can use the prisma CLI to set up .


#7

Never mind. I’m still confused

image

I’ll just start reading the Graphcool and Prisma docs again.
Thanks.


#8

I’m confused too… I think we have to wait to see where graphcool is going to go.


#9

So why am I directed to graphcool/prisma github when I click on
"Graphcool’s command line tool" in the graphcool docs?

image


#10

#11

just one simple question for now.
I want to deploy to the cloud based service.
Which cli should I use?


#12

I was also confused … but now it is clearer …
prisma allows you to create easily create graphql CRUD and other api backed by any popular database you have

Graphcool on the other hand is restricted to either cloud hosting or tied to mysql docker instance.
Prisma is sort of more flexible in terms of supported backends.


#13

I have the same question and I assume that @nilan already answered that:

but as most of you I’m confused and not sure.

@nilan could you please confirm?


#14

Same confusion here.

Also, it seems that npm install graphcool and npm install graphcool-framework resolve to the exact same software, but installed twice.


#15

I would forget about npm install graphcool and user npm install -g prisma.
graphcool has only been in beta and is now released as prisma.
Stick to this documentation.
https://www.prismagraphql.com/docs


#16

Ahah what a mess… thanks man!


#17

Oh and be aware, the graphcool-framework is different from prisma. Different syntax here and there, different concept.
I started with graphcool-framework (cloud) which is:
client > cloud > (build your own custom resolvers/ serverless) > other API’s like email services etc…
client > cloud > graphcool database API (autogenerated. very cool!)

Prisma is (afaics):
client>graphqlserver: map your own resolver functions (also CRUD) to > prisma database API (auto generated)
client>graphqlserver: custom resolver functions > other API’s like email services etc…
I’ve only experimented with Prisma for a day now, and it looks like you have to
build your own (crud + get) mappings from graphql server to the prisma API. Not really sure if that’s the only option.
I hope there’s a way to connect directly from client to prisma API.
Would be cool if I could follow this rule:
Only build custom resolvers in the graphql server if the prisma API can’t handle it. (auth, email, 3rd part API’s)
And if you really feel the urge, add a resolver function in front of prisma

delete(parent, { id }, ctx, info) { // graphql app server layer
  return ctx.db.mutation.deletePost( // prisma API
  {
    where: { id }
  },
    info
  );
}

#18

Graphcool 1.0 was a misnomer, causing a lot of confusion.

Can you repeat this from the mountain top about a thousand times? That would be helpful.

As mentioned above, there are two packages on npm, graphcool-framework and graphcool. Both seem to be the same version now (0.11.5), but it just adds more confusion.

There needs to be a sticky post on your medium blog that clarifies all of this.


#19

I too faced the same confusion. A few months back I did a few analysis of graphcool to vet it as a potential backend for an internal project.

Unfortunately I started around the initial announcements of the new graphcool.

So as I did my review I took practical notes and tried to follow through the docs as best a possible to give a fair review for my team. Which at the time the docs were in the very early stages of updating. (Nice work on the new docs btw).

So from a hands on experience here is what I discovered.

Graphcool was a great solution to tie a lot of different endpoints together. For example we knew we would need to connect to different analytics services and funnel queried data into one location. Graphcool’s functions are the ideal thing to use for such a use case.

However it’s a very hands on setup and if you wanted to deploy such a service it was slightly more challenging . At least at the time it was.

On the other hand we were also looking to build an admin backend for a different project that would run with a vue(nuxt.js) frontend. Prisma seems more inline with that type of use case.

So this is purely an opinion but I would say use graphcool for more hands on and control over the evolution of a backend framework where you’d need to connect apis etc.

And use prisma if you have an existing database where you want to add an api later over top of it to expose your data to the flexibly of graphql. For example you have a database for your company and your team is planning to roll out a mobile app as well as a new web interface which needs to share the same data with a clean DAL.

I could be completely wrong so @nilan feel free to correct me if I’ve misspoken in anyway.


#20

Hey @rwatts3, your assessment goes into the right direction. Here’s my perspective:

  • Graphcool Framework is an opinionated backend solution, combining a powerful GraphQL API with serverless functions and other components into one stack
  • Prisma is the core of Graphcool Framework (conceptually), and comes with a revamped GraphQL API that fitsusing GraphQL Bindings better. Using Prisma lets you freely choose the components of your backend stack, which comes with more flexibilty and a steeper getting started curve.

#21

Thanks everyone for participating in this discussion.

I tried to paint a clearer picture in this forum thread: Graphcool Framework and Prisma

Please chime in there if you have further comments or questions :slightly_smiling_face:


#22