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)

Searching Database…

12.9K ·GitHub
Что это?Монорепозиторий Graphile Crystal объединяет пакеты Graphile, связанные с GraphQL. Главные из них: Grafast (движок планирования и выполнения запросов для GraphQL.js) и PostGraphile (автоматически генерирует высокопроизводительный API GraphQL из базы данных PostgreSQL), а также множество вспомогательных библиотек.
Это одна библиотека или набор отдельных пакетов?Это монорепозиторий, который содержит множество пакетов npm, каждый из которых можно публиковать независимо: Grafast, PostGraphile, @dataplan/pg, pg-sql2, pg-introspection, graphile-build и другие. Некоторые из них можно установить и использовать отдельно.
Как выбрать, какой пакет установить?Установите только нужный пакет из npm: «postgraphile» — для полного инструмента, который создаёт API из базы данных; «grafast» — чтобы добавить быстрый движок выполнения в собственную схему GraphQL.js; или низкоуровневые помощники, например «pg-sql2» и «pg-introspection», для самостоятельного построения SQL-запросов и интроспекции Postgres.
Нужна ли база данных PostgreSQL, чтобы пользоваться этими пакетами?Она нужна только для пакетов, ориентированных на Postgres: PostGraphile, @dataplan/pg, pg-sql2, pg-introspection и graphile-build-pg работают с базой данных PostgreSQL. Сам Grafast — универсальный движок выполнения GraphQL.js и не требует Postgres.
Что случилось со старой версией PostGraphile V4?Версия V4 перенесена в отдельную устаревшую ветку. В основной ветке этого репозитория теперь находится более новая версия, построенная на основе Grafast.
Почему монорепозиторий называется «Crystal»?Grafast изначально имел кодовое название «Graphile Crystal» и использовался как секретное кодовое слово до публичного анонса. Поэтому мейнтейнеры назвали монорепозиторий по этому прозвищу.
Что Grafast заменяет в обычной настройке GraphQL.js?Это прямая замена функции execute из GraphQL.js. Она позволяет писать декларативные «plan resolvers» вместо традиционных резолверов, что делает выполнение запросов эффективнее.
Могу ли я со временем перестать использовать автоматически сгенерированную схему PostGraphile и вести код самостоятельно?Да. Пакет graphile-export умеет экспортировать созданную динамически в памяти схему GraphQL в обычный исходный код JavaScript. Этот код затем можно импортировать и поддерживать самостоятельно.
Creator
graphile
Size
124.9 MB
Stars
12.9K
Age
10y
Commits · 90 Days