Skip to content

ale13jo/graphcool-framework

 
 

Repository files navigation

WebsiteDocsBlogForumSlackTwitter

CircleCI Slack Status npm version

Graphcool is an open-source backend development framework to develop and deploy GraphQL APIs.

To learn more about building scalable and production-ready GraphQL servers, be sure to check out Prisma.

Architecture

Graphcool is a new kind of framework that introduces clear boundaries between your business logic and stateful components. This separation allows the framework to take advantage of modern cloud infrastructure to scale the stateful components without restricting your choice of programming language and development workflow.

GraphQL Database

The most important component in the Graphcool Framework is the GraphQL Database:

  • Query, mutate & stream data via GraphQL CRUD API
  • Define and evolve your data model using GraphQL SDL

If you have used the Graphcool Backend as a Service before, you are already familiar with the benefits of the GraphQL Database.

The CRUD API comes out of the box with advanced features such as pagination, expressive filters and nested mutations. These features are implemented within an efficient data-loader engine, to ensure the best possible performance.

Deployment

Graphcool services can be deployed with Docker or the Graphcool Cloud.

Docker

You can deploy a Graphcool service to a local environment using Docker. To run a graphcool service locally, use the graphcool local sub commands.

This is what a typical workflow looks like:

graphcool init     # bootstrap new Graphcool service
graphcool local up # start local cluster
graphcool deploy   # deploy to local cluster

Graphcool Cloud (Backend-as-a-Service)

Services can also be deployed to shared clusters in the Graphcool Cloud. When deploying to a shared cluster, there is a free developer plan as well as a convenient and efficient pay-as-you-go pricing model for production applications.

The Graphcool Cloud currently supports three regions:

  • eu-west-1 (EU, Ireland)
  • ap-northeast-1 (Asia Pacific, Tokyo)
  • us-west-1 (US, Oregon)

FAQ

What's the relation between Graphcool and Prisma?

Think of Prisma as the query engine that used to power the Graphcool Framework. Prisma is available to the developer community as a standalone tool to simplify the implementation of GraphQL servers and other applications.

You can read more about the differences between Prisma and the Graphcool Framework here and here.

Why is Graphcool Core written in Scala?

At the core of the Graphcool Framework is the GraphQL Database, an extremely complex piece of software. We developed the initial prototype with Node but soon realized that it wasn't the right choice for the complexity Graphcool needed to deal with.

We found that to be able to develop safely while iterating quickly, we needed a powerful type system. Scala's support for functional programming techniques coupled with the strong performance of the JVM made it the obvious choice for Graphcool.

Another important consideration is that the most mature GraphQL implementation - Sangria - is written in Scala.

Is the API Gateway layer needed?

The API gateway is an optional layer for your API, adding it to your service is not required. It is however an extremely powerful tool suited for many real-world use cases, for example:

  • Tailor your GraphQL schema and expose custom operations (based on the underlying CRUD API)
  • Intercept HTTP requests before they reach the CRUD API; adjust the HTTP response before it's returned
  • Implement persisted queries
  • Integrate existing systems into your service's GraphQL API
  • File management

Also realize that when you're not using an API gateway, your service endpoint allows everyone to view all the operations of your CRUD API. The entire data model can be deduced from the exposed CRUD operations.

Community

Graphcool has a community of thousands of amazing developers and contributors. Welcome, please join us! 👋

Contributing

Your feedback is very helpful, please share your opinion and thoughts!

+1 an issue

If an existing feature request or bug report is very important for you, please go ahead and 👍 it or leave a comment. We're always open to reprioritize our roadmap to make sure you're having the best possible DX.

Requesting a new feature

We love your ideas for new features. If you're missing a certain feature, please feel free to request a new feature here. (Please make sure to check first if somebody else already requested it.)

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 84.6%
  • TypeScript 14.4%
  • Other 1.0%