# PostGraphile vs Relay

**Leader by vioscaleAI score:** Relay

| Attribute | PostGraphile | Relay |
|---|---|---|
| **vioscaleAI score** | 52.2 (47% (low)) | 69.9 (58% (medium)) |
| activity.commits_last_30d | 16 | 100 |
| adoption.dependent_repos | 501 | 76,213 |
| adoption.github_stars | 12,935 | 18,962 |
| adoption.package_downloads_weekly | 101,072 | 4,659,338 |
| content.faq | `[{"answer":"An open-source tool that generates GraphQL APIs directly from PostgreSQL databases, with emphasis on performance and customizability. The generated API can be extended and modified to meet specific application needs. It is indexed under GraphQL Tools.","source":"https://www.graphile.org/postgraphile/","question":"What is PostGraphile?","confidence":0.6},{"answer":"PostGraphile is open source, so it can be self-hosted and used at no licence cost. It is released under the MIT licence. A commercial or hosted edition starts at $375. Prices are published openly on the vendor's own pricing page. Pricing changes often, so verify at source before relying on it.","source":"https://www.graphile.org/postgraphile/","question":"Is PostGraphile free to use?","confidence":0.6},{"answer":"We have confirmed browser-based access to PostGraphile. That is the extent of what we could verify from public sources, so it may well offer desktop or mobile clients we have not indexed.","source":"https://www.graphile.org/postgraphile/","question":"What platforms does PostGraphile support?","confidence":0.6},{"answer":"Yes. PostGraphile can be deployed self-hosted, so it does not have to run on the vendor's infrastructure.","source":"https://www.graphile.org/postgraphile/","question":"Can PostGraphile be self-hosted?","confidence":0.6},{"answer":"Yes. PostGraphile is published under the MIT licence, a permissive licence that generally allows commercial use and modification. Licence terms can change between releases, so verify against the repository for the version you intend to use.","source":"https://github.com/graphile/crystal","question":"Is PostGraphile open source?","confidence":0.99},{"answer":"PostGraphile is available worldwide. Its primary market is the United States.","source":"https://www.graphile.org/postgraphile/","question":"Where is PostGraphile available?","confidence":0.5}]` | `[{"answer":"An open-source framework that enables type-safe GraphQL queries in JavaScript applications, with built-in support for caching, error handling, and server-side rendering via React Server Components. It is indexed under GraphQL Tools.","source":"https://relay.dev","question":"What is Relay?","confidence":0.6},{"answer":"Relay is open source, so it can be self-hosted and used at no licence cost. It is released under the MIT licence. Pricing changes often, so verify at source before relying on it.","source":"https://relay.dev","question":"Is Relay free to use?","confidence":0.6},{"answer":"Relay supports the web and a command-line interface. Platforms we have not confirmed are simply not listed here rather than ruled out.","source":"https://relay.dev","question":"What platforms does Relay support?","confidence":0.6},{"answer":"Yes. Relay can be deployed self-hosted, so it does not have to run on the vendor's infrastructure.","source":"https://relay.dev","question":"Can Relay be self-hosted?","confidence":0.6},{"answer":"Yes. Relay is published under the MIT licence, a permissive licence that generally allows commercial use and modification. Licence terms can change between releases, so verify against the repository for the version you intend to use.","source":"https://github.com/facebook/relay","question":"Is Relay open source?","confidence":0.99}]` |
| deployment.options | `{"self_hosted":true}` | `{"self_hosted":true}` |
| description.long | PostGraphile is a tool that automatically creates a GraphQL API from a PostgreSQL database, eliminating the need to build custom APIs. It includes built-in security through PostgreSQL's role-based access and row-level security policies, along with performance optimization and extensibility features. | A GraphQL client for React that automates data fetching and manages normalized client-side state across components. It provides type-safe queries, mutations with optimistic updates, streaming support, and maintains data consistency across the application. |
| features.capabilities | `{"role":"db_to_graphql","language":"JavaScript/TypeScript","self_hostable":true,"subscriptions":true,"auth_directives":true,"schema_approach":"introspection","type_generation":true,"db_introspection":true}` | `{"role":"client","caching":true,"language":"JavaScript / TypeScript","federation":false,"managed_cloud":false,"self_hostable":true,"subscriptions":true,"auth_directives":false,"schema_approach":"code_first","type_generation":true,"db_introspection":false}` |
| integrations.count | 1 | - |
| integrations.list | `[{"name":"PostgreSQL"}]` | - |
| language.primary | TypeScript | Rust |
| license.spdx | MIT | MIT |
| market.availability | `{"primaryMarkets":["US"],"availabilityScope":"global","availableCountries":[],"notAvailableCountries":[]}` | `{"primaryMarkets":[],"availabilityScope":"global","availableCountries":[],"notAvailableCountries":[]}` |
| platform.support | `{"cli":true}` | `{"cli":true,"ios":true,"web":true}` |
| pricing | `{"type":"open_source","plans":[{"free":true,"name":"Core (Open Source)","description":"Self-hosted GraphQL API generation from PostgreSQL","contactSales":false},{"free":false,"name":"On-Demand Consultancy","components":[{"kind":"one_time","amount":375,"currency":"USD"}],"description":"One hour of voice/screensharing with maintainer","contactSales":false},{"free":false,"name":"Development Support","components":[{"kind":"fixed","amount":999,"period":"month","currency":"USD"}],"description":"One-to-one access to Graphile team throughout the year; priority support via chat","contactSales":true}],"summary":"Open source and free. Professional support from $999/month.","freeTier":true,"sourceUrl":"https://www.graphile.org/postgraphile/","retrievedAt":"2026-08-14T16:37:12.955Z","startingPrice":{"amount":375,"period":"month","currency":"USD"}}` | `{"type":"open_source","summary":"Free and open-source","freeTier":true,"sourceUrl":"https://relay.dev","retrievedAt":"2026-08-14T16:35:58.790Z"}` |
| pricing.free_tier | yes | yes |
| pricing.model | open_source | commercial |
| pricing.price_level | free | free |
| pricing.transparent | yes | - |
| release.cadence_days | - | 47 |
| release.history | `[{"url":"https://github.com/graphile/crystal/releases/tag/graphile-build-pg%405.1.5","date":"2026-10-02T08:22:45Z","type":"stable","version":"graphile-build-pg@5.1.5"},{"url":"https://github.com/graphile/crystal/releases/tag/grafast%401.1.4","date":"2026-10-02T08:22:43Z","type":"stable","version":"grafast@1.1.4"},{"url":"https://github.com/graphile/crystal/releases/tag/ruru%402.0.2","date":"2026-09-04T14:47:04Z","type":"stable","version":"ruru@2.0.2"},{"url":"https://github.com/graphile/crystal/releases/tag/ruru-components%402.0.1","date":"2026-09-04T14:47:01Z","type":"stable","version":"ruru-components@2.0.1"},{"url":"https://github.com/graphile/crystal/releases/tag/postgraphile%405.1.5","date":"2026-09-04T14:47:10Z","type":"stable","version":"postgraphile@5.1.5"},{"url":"https://github.com/graphile/crystal/releases/tag/graphile-config%401.1.1","date":"2026-09-04T14:47:07Z","type":"stable","version":"graphile-config@1.1.1"},{"url":"https://github.com/graphile/crystal/releases/tag/graphile-build-pg%405.1.4","date":"2026-09-04T14:47:13Z","type":"stable","version":"graphile-build-pg@5.1.4"},{"url":"https://github.com/graphile/crystal/releases/tag/grafserv%401.0.2","date":"2026-09-04T14:47:22Z","type":"stable","version":"grafserv@1.0.2"},{"url":"https://github.com/graphile/crystal/releases/tag/grafast%401.1.3","date":"2026-09-04T14:47:16Z","type":"stable","version":"grafast@1.1.3"},{"url":"https://github.com/graphile/crystal/releases/tag/%40dataplan/pg%401.1.2","date":"2026-09-04T14:47:19Z","type":"stable","version":"@dataplan/pg@1.1.2"},{"url":"https://github.com/graphile/crystal/releases/tag/postgraphile%405.1.4","date":"2026-08-05T13:36:30Z","type":"stable","version":"postgraphile@5.1.4"},{"url":"https://github.com/graphile/crystal/releases/tag/grafast%401.1.2","date":"2026-08-05T13:36:32Z","type":"stable","version":"grafast@1.1.2"},{"url":"https://github.com/graphile/crystal/releases/tag/postgraphile%405.1.3","date":"2026-08-04T07:44:26Z","type":"stable","version":"postgraphile@5.1.3"},{"url":"https://github.com/graphile/crystal/releases/tag/graphile-build-pg%405.1.3","date":"2026-08-04T07:44:29Z","type":"stable","version":"graphile-build-pg@5.1.3"},{"url":"https://github.com/graphile/crystal/releases/tag/grafast%401.1.1","date":"2026-08-04T07:44:32Z","type":"stable","version":"grafast@1.1.1"},{"url":"https://github.com/graphile/crystal/releases/tag/postgraphile%405.1.2","date":"2026-07-29T07:07:04Z","type":"stable","version":"postgraphile@5.1.2"},{"url":"https://github.com/graphile/crystal/releases/tag/graphile-build%405.1.1","date":"2026-07-29T07:07:01Z","type":"stable","version":"graphile-build@5.1.1"},{"url":"https://github.com/graphile/crystal/releases/tag/graphile-build-pg%405.1.2","date":"2026-07-29T07:07:07Z","type":"stable","version":"graphile-build-pg@5.1.2"},{"url":"https://github.com/graphile/crystal/releases/tag/postgraphile%405.1.1","date":"2026-07-22T10:38:15Z","type":"stable","version":"postgraphile@5.1.1"},{"url":"https://github.com/graphile/crystal/releases/tag/graphile-utils%405.0.3","date":"2026-07-22T10:38:12Z","type":"stable","version":"graphile-utils@5.0.3"}]` | `[{"url":"https://github.com/facebook/relay/releases/tag/v21.0.1","date":"2026-05-27T17:05:47Z","type":"stable","version":"v21.0.1"},{"url":"https://github.com/facebook/relay/releases/tag/v21.0.0","date":"2026-05-18T22:35:02Z","type":"stable","version":"v21.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v20.1.1","date":"2025-08-06T23:45:00Z","type":"stable","version":"v20.1.1"},{"url":"https://github.com/facebook/relay/releases/tag/v20.1.0","date":"2025-07-28T18:02:48Z","type":"stable","version":"v20.1.0"},{"url":"https://github.com/facebook/relay/releases/tag/v20.0.0","date":"2025-06-14T01:18:21Z","type":"stable","version":"v20.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v19.0.0","date":"2025-05-02T21:35:03Z","type":"stable","version":"v19.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v18.2.0","date":"2024-11-21T18:42:55Z","type":"stable","version":"v18.2.0"},{"url":"https://github.com/facebook/relay/releases/tag/v18.1.0","date":"2024-10-04T21:25:48Z","type":"stable","version":"v18.1.0"},{"url":"https://github.com/facebook/relay/releases/tag/v18.0.0","date":"2024-09-07T01:12:44Z","type":"stable","version":"v18.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v17.0.0","date":"2024-06-14T23:56:58Z","type":"stable","version":"v17.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v16.2.0","date":"2024-01-23T16:49:06Z","type":"stable","version":"v16.2.0"},{"url":"https://github.com/facebook/relay/releases/tag/v16.1.0","date":"2023-12-11T20:21:51Z","type":"stable","version":"v16.1.0"},{"url":"https://github.com/facebook/relay/releases/tag/v16.0.0","date":"2023-10-19T22:38:09Z","type":"stable","version":"v16.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v15.0.0","date":"2023-03-08T22:16:55Z","type":"stable","version":"v15.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v14.1.0","date":"2022-07-27T17:37:43Z","type":"stable","version":"v14.1.0"},{"url":"https://github.com/facebook/relay/releases/tag/v14.0.0","date":"2022-06-08T15:11:54Z","type":"stable","version":"v14.0.0"},{"url":"https://github.com/facebook/relay/releases/tag/v13.2.0","date":"2022-03-10T18:08:49Z","type":"stable","version":"v13.2.0"},{"url":"https://github.com/facebook/relay/releases/tag/v13.1.1","date":"2022-02-09T18:02:09Z","type":"stable","version":"v13.1.1"},{"url":"https://github.com/facebook/relay/releases/tag/v13.1.0","date":"2022-02-08T16:53:14Z","type":"stable","version":"v13.1.0"},{"url":"https://github.com/facebook/relay/releases/tag/v13.0.3","date":"2022-02-07T21:41:14Z","type":"stable","version":"v13.0.3"}]` |
| reliability.status_page | yes | - |
| security.scorecard | - | 5.8 |
| security.vulnerabilities | `{"count":0,"source":"https://advisories.ecosyste.ms/api/v1/advisories?ecosystem=npm&package_name=pg-sql2&per_page=100","last_12m":0,"max_severity":null}` | `{"count":0,"source":"https://advisories.ecosyste.ms/api/v1/advisories?ecosystem=npm&package_name=relay-runtime&per_page=100","last_12m":0,"max_severity":null}` |

## Capabilities (GraphQL Tools)

| Capability | PostGraphile | Relay |
|---|:--:|:--:|
| **Core** |  |  |
| Role | DB-to-GraphQL | Client |
| Primary language | JavaScript/TypeScript | JavaScript / TypeScript |
| **Modelling** |  |  |
| Schema approach | DB introspection | Code-first |
| **Scale** |  |  |
| Federation / subgraph composition | - | ✗ |
| **Realtime** |  |  |
| Real-time subscriptions | ✓ | ✓ |
| **Performance** |  |  |
| Response / edge caching | - | ✓ |
| **DX** |  |  |
| Typed code generation | ✓ | ✓ |
| **Automation** |  |  |
| Generates API from a database | ✓ | ✗ |
| **Security** |  |  |
| Built-in authz / permissions | ✓ | ✗ |
| **Deployment** |  |  |
| Official hosted offering | - | ✗ |
| Self-hostable | ✓ | ✓ |

*Source: vioscaleAI. Generated 2026-10-16T19:17:03.480Z. "-" = undocumented, not absent.*
