GraphQL Ruby
graphql-ruby.org
- Free plan
- API
- Self-hosted
What GraphQL Ruby is
GraphQL Ruby is a Ruby gem for adding a GraphQL API to Ruby or Rails applications. Its schema describes an application's API through strongly typed, self-documenting types. The library can handle queries, mutations, subscriptions, streaming responses, and multiplexed queries. Configurable depth and complexity checks can reject queries that exceed chosen limits. Its authorization framework can control schema visibility and check application objects as queries run; authentication is generally handled by the application controller. GraphQL::Dataloader batches external data access and caches results within a query, while AsyncDataloader supports parallel I/O. Documentation covers clients including Relay, Apollo Client, GraphQL.js Client, GraphiQL, urql, and custom JavaScript, as well as monitoring integrations such as Datadog, New Relic, Prometheus, and Sentry. The open-source gem is free at no cost and uses an MIT license. GraphQL::Pro costs $1,100 a year and GraphQL::Enterprise costs $2,400 a year; both use commercial licenses. Pro adds persisted queries and prioritized support, while Enterprise adds rate limiting, server-side caching, and schema versioning.
Who it suits
GraphQL Ruby suits Ruby and Rails developers building GraphQL APIs. Teams needing persisted-query features or commercial support can consider GraphQL::Pro or GraphQL::Enterprise.
Good to know, and what to watch
- Free open-source gem with an MIT license
- Supports queries, mutations, subscriptions, and streaming responses
- Depth and complexity checks can reject demanding queries
- Dataloader batches external access and caches query results
- Authentication is generally handled by the application controller
- Pro and Enterprise use commercial licenses
Plans
Every plan and priceGraphQL Ruby gem
GraphQL::Pro
GraphQL::Enterprise
Free plan
Getting started
- Open the GraphQL Ruby website
- Add the graphql gem to your application’s Gemfile
- Run bundle install through RubyGems
- Use the gem in a Ruby or Rails application
- Connect a documented client such as Relay, Apollo Client, GraphiQL, urql, or custom JavaScript
Limits to check
The free GraphQL Ruby gem does not include the Pro and Enterprise additions, such as persisted queries, prioritized support, rate limiting, server-side caching, or schema versioning. Pro and Enterprise are paid commercial-license plans.
The verdict
The free gem covers GraphQL server functionality for Ruby applications, with tools for query checks, authorization, and data loading. Pro and Enterprise add commercial features at separate annual prices.
Questions people ask
Is GraphQL Ruby free?
The GraphQL Ruby gem is free at no cost and uses an MIT license. GraphQL::Pro and GraphQL::Enterprise are paid commercial plans.
What do the paid plans cost?
GraphQL::Pro costs $1,100 a year. GraphQL::Enterprise costs $2,400 a year.
Where can it run?
GraphQL Ruby is provided as an API and self-hosted deployment for Ruby and Ruby on Rails applications.
Does it support persisted queries?
GraphQL::Pro includes the Pro OperationStore for normalized persisted queries, with Rack and ActiveRecord or Redis storage backends.
Which clients can connect?
The documentation describes Relay, Apollo Client, GraphQL.js Client, GraphiQL, urql, and custom JavaScript integrations.
What the maker publishes
- Authorization
- Its authorization framework supports schema visibility and checks application objects during query execution; authentication is generally handled by the application controller. source
- Client integrations
- The docs describe using Relay, Apollo Client, GraphQL.js Client, GraphiQL, urql, and custom JavaScript with GraphQL-Ruby. source
- Data loading
- GraphQL::Dataloader batches external data access, caches results per query, and AsyncDataloader supports parallel I/O. source
- Execution
- The library supports serving queries, mutations, subscriptions, streaming responses, and multiplexed queries. source
- Installation
- The open-source gem is installed from RubyGems by adding graphql to an application's Gemfile and running bundle install. source
- License
- RubyGems lists the graphql gem license as MIT, while GraphQL::Pro and GraphQL::Enterprise use special commercial licenses. source
- Monitoring integrations
- Tracing documentation lists integrations including ActiveSupport Notifications, AppSignal, Datadog, New Relic, Prometheus, Sentry, Scout APM, and StatsD. source
- Persisted queries
- The Pro OperationStore maintains normalized persisted queries using Rack and ActiveRecord or Redis storage backends, and can reject arbitrary queries when configured as a whitelist. source
- Pro support
- GraphQL::Pro customers receive direct access to the gem creator and maintainer, prioritized support, and can report issues or request features by GitHub issue or email. source
- Protection
- GraphQL-Ruby provides configurable query depth and complexity validations to help reject deeply nested or complex queries. source
- Purpose
- The graphql gem implements the GraphQL Server Specification in Ruby and adds a GraphQL API to Ruby or Rails applications. source
- Schema
- A GraphQL schema describes an application's API with a self-documenting, strongly typed type system. source
- Supported application styles
- The Pro subscriptions feature works with Rails, Sinatra, Hanami, or another Rack-based framework and uses Redis with Pusher or Ably. source
Checked against the maker's pages on 4 Oct 2026.