Graphcool Framework and Prisma


#1

About a month ago, we announced the developer preview of Prisma, initially calling it Graphcool 1.0. The release of Prisma earlier this week was met with lots of positive feedback and excitement.

Both events have resulted in many questions and confusion in our community that I’d like to address in this post.


Prisma

Prisma is an open-source GraphQL query engine that turns your database into a GraphQL API. It is the perfect foundation to help you build GraphQL servers.

You can potentially connect to Prisma directly from the frontend - but most applications will need a server in front of Prisma to handle things like authentication, integrations of 3rd party services and other business logic.

The best way to build that server is by using GraphQL Yoga and Prisma bindings. Thanks to the bindings, the implementation of the GraphQL server is almost trivial as the heavy-lifting for query resolution is done by Prisma (i.e. generating database queries and reading/writing to/from the database). To see what a GraphQL server built with graphql-yoga and Prisma bindings look like, check out the GraphQL boilerplate projects for Node and TypeScript.

Learn how to build a GraphQL server with graphql-yoga and Prisma in this tutorial.

Because Prisma is entirely open-source, you can host it yourself using your favorite cloud provider (based on Docker). If you don’t want to deal with such infrastructure management, the easiest way to run Prisma in production is by using Prisma Cloud.

Graphcool Framework

The Graphcool Framework is an open-source and self-hosted GraphQL backend-as-a-service that provides an opinionated backend setup:

  • A GraphQL query engine and web server
  • A serverless function component, providing means to implement common workflows like authentication or other business logic
  • A permission system, based on GraphQL permission queries
  • The graphcool CLI, that is used to deploy a specific configuration of the above components to a Graphcool service

You can read more about the Graphcool Framework in the documentation.

Prisma or Graphcool Framework?

There’s a detailed discussion in this forum thread about why it can be beneficial to use Prisma over the Graphcool Framework.

Prisma is the perfect choice if you need a fully-fledged GraphQL server. In combination with graphql-yoga and Prisma bindings, it allows to quickly build powerful GraphQL servers that are flexible and cater to all your use cases. Using GraphQL boilerplates, you can easily bootstrap the foundation for your GraphQL server that already comes with features like authentication and realtime capabilities. To deploy your GraphQL server to the web, you can use great one-click deployment tools such as Zeit Now or Apex Up.

Graphcool Framework offers an opinionated backend setup.

If you like the concepts and features of Graphcool Framework and it fits your use case then consider using it. If you like to have more flexibility and more choice in how to put together your GraphQL backend stack, then I encourage you to check out Prisma for your next project.


Outdated Resources

Due to several renamings of repositories and both CLIs during the Prisma developer preview, you might come across inaccurate documentation or broken links. We are currently going through all our resources accordingly. If you encounter anything unexpected, you are welcome to provide your feedback here.


If you have any question at all about the Graphcool Framework or Prisma, don’t hesitate to post it in this thread.

Best
– Nilan


Steps to upgrade to 1.0
Graphcool-framework vs graphcool v1(beta) vs prisma?
Prisma as query engine on Graphcool-Framework?
Schema query permission
Developer Preview: Graphcool 1.0 Beta
Blog post explaining graphcool services, prisma etc...?
504 - Time outs
Function view in web console loads forever
Advice on best practise? - Deploying graphql-yoga server w/ Prisma in production
Server Side Subscriptions for event driven Domain logic with Prisma
Future of the graphcool-framework
#2

Can Graphcool Framework truly be self-hosted for production purpose? The most recent website docs are now leaning towards self-hosting for a local/dev environment (ie. “we condensed this complexity down to three core services necessary to run Graphcool for an optimal local development experience:”). There is still no proper documentation on how to do this (ie. do something a simple as swap out the docker internal mysql connection)


#3

Thanks for the write-up, looking forward to hosted Prisma API service! faster-parrot


#4

Thank you for the great work! I really believe Prisma is the right abstraction. Graphcool BaaS is / was brilliant, but I think most projects will run into too many cases where they need a server.

I know I’m jumping ahead and being one of those annoying feature request guys :smile: … but… are there any plans for the binding package in other languages?

Dennis


#5

ping! no replies to questions posted here 6d


#6

10 days since @mark_green posted his question.

We’re evaluating graphcool, but not far not very impressed. From my dev:

When I saw Graphcool the first time, I was amazed because their onboarding and tutorials were excellent. Unfortunately, I can not say the same thing for this version. I spent quite some time trying to understand the docs. I believe they are poorly written. I did not use either Authentication and Function properties however I can say that the system is not mature yet (even some URLs on the Documentation are broken ). So please keep that in mind if you want to go further with it.


#7

Thanks for your questions so far, that’s super helpful :raised_hands:


There is no complete tutorial for this yet, but you can self-host Graphcool Framework yourself. For production purposes, I recommend hosting it on a cloud provider such as AWS. The Graphcool Framework is a Docker container controlled with docker-compose, so looking at how that configuration file is wiring things up should point you in the right direction :slight_smile:

If you have further questions in this regard, I recommend creating a new Forum thread to continue that discussion.


There are no concrete plans for specific bindings in other languages, but I’d love to receive more feedback from the community on this one! Creating a new feature request for a binding in your favorite language is a great first step here :slight_smile: I would love to expand the binding concept to especially more typed languages, as it leads to a great developer experience.


Hey @maxhodges, thanks a lot for bringing this to my attention :slight_smile:

I’m sorry your developer had troubles with the documentation, we’re continuously improving it! if you have specific questions or topics that could be better covered by an example or in the reference documentation, I’m very eager to hear your feedback.


All the best
– Nilan


#8

sure here you go:
@nilan

dev 1

I’m still working on importing the rest of the data to the db.
I tried this other cli tool (graphql-cli-load) that is supposed to allow uploading json and csv data, but I haven’t had luck with it either.

dev 2

By the way, I realized Graphcool is pretty awesome but it has serious documentation issues. In order to fill the DB with the Japan post data, I had to make my own Node + Apollo scripts to parse and send requests. It seems the CLIs (both graphcool’s and graphql’s) don’t work very well when importing. In fact, I found a post from probably another applicant with the same issue I faced (one of them), so looks like something that should be fixed or documented in Graphcool.

dev 3

For data import first I converted the CSV you gave me into JSON. Then I converted it to NDF format of Graphcool. After that I had to ad unique IDs to every node. I got error importing via Graphcool API so I used Postman to send RAW API calls to import the whole data. However it gave me SERVER error as well. Then I thought, may be it is due to the big file size (although documentation says that the limit is 10MB). I wrote a node script (/server/changer.js) that sliced the data into chunks. I imported each chunk one by one after that. This whole DATA IMPORT part was where I spent most of my time.

We have several job applicants attempting a trial project with graphcool. Several say data loading was harder than it should have been.


#9

Hey @maxhodges thanks a lot for your feedback :slight_smile:

Looks like this Forum topic might be interesting to you and your fellow developers: Problem on data import using the CLI?

I’ll look into improving this part of the documentation going forward.

I feel that our discussion is quite derailing from the original topic of this post, so please open a new thread if you want to discuss further questions in more detail :slight_smile:

Best
– Nilan


#10

sure it’s just that all that plus the lack of response here (unanswered posts for 10 days–after inviting people to ask questions) adds up to a negative experience I thought you should hear.


#11

Graphcool Framework is an all-in-one backend solution, that’s a great fit if you want to have a fully fledged GraphQL backend.

The target market for this product seems significant, overlapping I suspect with Firebase’s audience and other frameworks like Meteor.js. Developers who want to ‘stand on the shoulders of giants’ and not write all the authentication logic etc.

Q: What is on the roadmap for Graph.Cool Baas to meet the needs of developers who want to focus their time build apps using GraphQL, not spend their time building GraphQL severs

On the Graph.Cool website, its says:

“High performance and reliable GraphQL backend hosting for developers who would rather spend their time building apps than managing databases”. - graph.cool website

The above quote from the GC website is shown alongside a mockup of a backend monitor dashboard. I recall seeing a post (in Slack or on the forum) asking how to integrate Apollo Engine and seeing a reply from GC that there would be one coming. I assume, it is the mockup shown in the image on the website.

Q: When using GraphCool (not Prisma at this point), is the dashboard on the roadmap for things like performance tracing, schema management, error tracking, caching? Or will there be a chance to integrate Apollo Engine in future instead or in the meantime?

Q: is Prisma Cloud going to replace the original GraphCool BaaS product at some point - I ask because of this recent Medium article: https://blog.graph.cool/prisma-cloud-preview-invite-only-c251bebf5670

Thanks for introducing me to GraphQL without the overhead and hassle. Thanks for providing tools to get something up and running so i could focus on the overall product and not the infrastructure… I’d like to stay and grow projects with you - it would just be good to know where this is all going :slight_smile:


#12

I would love to pay for graphcool cloud!
But right now there’s to much confusion and to less information.

@nilan Do you plan on releasing a roadmap? I think the dashboard isn’t implemented for Graphcool Cloud yet, but seems to be part of Prisma Cloud. This gives us the impression, that you are focusing all your energy on Prisma and neglecting Graphcool Cloud. When will you integrate Prisma back to the Graphcool Cloud?
Can we use the Graphcool Cloud as our backend for our production app with tens of thousands users?


#13

Fwiw, I’m rooting for your team but I’m another person who is holding off any usage of Graphcool due to the poor documentation.

For example, your marketing tells essentially tells me not to worry about vendor lock-in because I can always host a graphcool framework server myself but there is no documentation that verifies that. The best you’ve got is “Private Clusters (coming soon)”.

I might give you the project a try on a weekend project but right now this is miles behind other BaaS providers in terms of making me feel comfortable.


#14

Graphcool/Graphcool-framework/Prisma is a great idea but the documentation is so broken it’s embarrassing. I’ve been documenting issues for the team to resolve for months and it seems like things only get worse. As a solo developer building a full stack app, I need a backend that I don’t have to worry about. I started with Graphcool, migrated to Graphcool-Framework, and I won’t be migrating to Prisma.


#15

Thanks for your questions @typeofgraphic!

We will not apply bigger architectural changes to the Graphcool Framework in the near or mid future. For now, we will focus on stability and performance in the Framework, not on new features.

There are no plans to integrate Graphcool Cloud with Apollo Engine as of now.

No, we’ll continue to offer both products.

With Prisma, we are focusing on two aspects right now. One is building out GraphQL connectors for more databases (think MongoDB, Postgres, Elasticsearch, …), the other is leveraging GraphQL bindings (with prisma-binding) to make the developer experience when building GraphQL servers as seamless and simple as possible.


#16

Hey @benseitz,

we’re preparing a public roadmap already, yep!

This is correct, see my previous answer as well.

There is no clear timeline yet, and once it’s there it will likely incur a major migration.

Absolutely :slight_smile:


#17

@nilan thank you, this clarifies a few things.
I hope you will release der roadmap soonish. In my opinion, there’s a lot of confusion going on in the community that leads to disappointment. I completely understand that you are already developing and lightning speed and love everything that you do. But knowing where we are at and what to expect in the near future is very vital to a lot of us…

Keep up the good work :slight_smile:


#18

Hello,

It would be helpful to fix Graphcool website link to the correct Github repository.

Today if you go to https://www.graph.cool/, Github button is linked to https://github.com/graphcool/graphcool and redirected to https://github.com/graphcool/prisma.

I think the correct link would be https://github.com/graphcool/graphcool-framework

BTW, I didn’t try Prisma yet, but I love Graph.cool and I wish the project keeps evolving.


#19

Thanks @jpbarbosa I updated the links :slightly_smiling_face: