crystal README

The project's README from github.com/graphile/crystal. As one markdown file: README.md.

🔮 Graphile's Crystal Monorepo

GitHub Sponsors Discord chat room Follow Follow

At Graphile we love GraphQL so much we named ourself for our love of it! This repository houses many of the Graphile packages that relate to GraphQL (or relate to the packages that relate to GraphQL, or relate to those package...); the two headline projects are Grafast and PostGraphile but there's many other packages, a fair few of which can be used independently - see below for more details.

Grafast: A cutting-edge planning and execution engine for GraphQL.js ─ use this as a drop-in replacement for the execute method from GraphQL.js and by moving from traditional resolvers to Grafast "plan resolvers" you'll be able to leverage the declarative nature of GraphQL requests to execute your business logic in the most efficient way, leading to reduced server load and happier customers. Use this if you're building your own GraphQL schemas and want the best performance and efficiency without having to put much extra effort in.

PostGraphile: An incredibly low-effort way to build a well structured and high-performance GraphQL API backed primarily by a PostgreSQL database. Our main focusses are performance, automatic best-practices and customisability/extensibility. Use this if you have a PostgreSQL database and you want to use it as the "source of truth" for an auto-generated GraphQL API (which you can still make significant changes to). NOTE: thanks to graphile-export you can also use this as a starting point for an API that you then manage yourself.

➡️ For PostGraphile V4 see the legacy branch

Project summaries

Here's a rough breakdown of the main packages:

Crowd-funded open-source software

To help us develop this software sustainably, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship.

Click here to find out more about sponsors and sponsorship.

And please give some love to our featured sponsors 🤩:

Steelhead
Steelhead
*

* Sponsors the entire Graphile suite

Why the "crystal" monorepo?

Originally what is now Grafast (and was previously DataPlanner) was known by the codename "Graphile Crystal." This lead us to use the 🔮 emoji to represent the project in secret before we announced it publicly, as a codeword for those in the know. Now that Grafast is the name for our planning and execution engine and we needed a name for the monorepo that wasn't too GraphQL specific (since there are things in here that aren't strictly related to GraphQL) and we figured that calling it the Crystal monorepo would honour our original nickname for the project. Rumours that the name was inspired by the maintainers' crystal wedding anniversary are greatly exaggerated.

crystal (graphile/crystal)

automatic-api
Searching Database…

12.9K ·GitHub
What is this?Graphile's Crystal monorepo bundles their GraphQL-related packages, headlined by Grafast (a planning and execution engine for GraphQL.js) and PostGraphile (which auto-generates a high-performance GraphQL API from a PostgreSQL database), plus many supporting libraries.
Is this one library or a collection of separate packages?It's a monorepo containing many independently publishable npm packages - Grafast, PostGraphile, @dataplan/pg, pg-sql2, pg-introspection, graphile-build and more - several of which can be installed and used on their own.
How do I pick which package to install?Install just the package you need from npm - 'postgraphile' for the full database-to-API tool, 'grafast' to add the fast execution engine to your own GraphQL.js schema, or lower-level helpers like 'pg-sql2' and 'pg-introspection' for building SQL and introspecting Postgres yourself.
Do I need a PostgreSQL database to use these packages?Only for the Postgres-focused packages - PostGraphile, @dataplan/pg, pg-sql2, pg-introspection and graphile-build-pg all work with a PostgreSQL database. Grafast itself is a generic GraphQL.js execution engine and doesn't require Postgres.
What happened to the older PostGraphile V4?V4 has been moved off to a separate legacy branch; this repository's main branch now contains the newer version built on top of Grafast.
Why is the monorepo called 'Crystal'?Grafast was originally codenamed 'Graphile Crystal' and used as a secret codeword before its public announcement, so the maintainers named the monorepo after that nickname.
What does Grafast replace in a normal GraphQL.js setup?It's a drop-in replacement for GraphQL.js's execute function, letting you write declarative 'plan resolvers' instead of traditional resolvers for more efficient query execution.
Can I stop using PostGraphile's auto-generated schema and manage the code myself later?Yes - the graphile-export package can export an in-memory, dynamically-built GraphQL schema to plain JavaScript source code, which you can then import and maintain yourself.
Creator
graphile
Size
124.9 MB
Stars
12.9K
Age
10y
Commits · 90 Days