OSS TanbouSign in with GitHub

Define typed GraphQL APIs in Ruby or Rails and execute client queries

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
5,444
Primary language
Ruby
License
MIT
Repository last updated
Oct 1, 2026
On this page

Overview

This GraphQL language implementation and runtime builds GraphQL servers in Ruby. Object types, fields, and query entry points are defined in Ruby code, and query strings are executed against the resulting schema. Rails applications can add the initial structure through generators.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Assemble types and schemas in Ruby code

Object types declare fields and return types, while a Query type provides the schema entry point. Passing a query string to Schema.execute resolves the selected fields and returns a result.

Sources: [2]

Add an API to Rails from generated boilerplate

rails generate graphql:install adds the base GraphQL structure to a Rails application. Additional generators create types, and the installer adds GraphiQL for development use.

Sources: [1][2]

Best fit

Expose Ruby models and services through a typed GraphQL API

It fits Ruby and Rails applications that want clients to select the fields they need. The server follows the GraphQL specification and can serve Relay or Apollo Client applications while keeping its implementation in Ruby.

Sources: [1][2]

Before adoption

Check the Ruby requirement and the paid-extension boundary

The v2.6.11 gemspec requires Ruby 2.7 or newer. The README lists persisted queries, API versioning, server-side caching, rate limiters, and several other capabilities under GraphQL::Pro, so confirm whether required features are part of the open-source runtime.

Sources: [3][1]

Official sources

  1. [1]graphql-ruby v2.6.11 README(2026-10-04)
  2. [2]graphql-ruby v2.6.11 getting started guide(2026-10-04)
  3. [3]graphql-ruby v2.6.11 gem specification(2026-10-04)
  4. [4]graphql-ruby GitHub repository metadata(2026-10-04)
  5. [5]graphql-ruby v2.6.11 MIT license(2026-10-04)
Supplemental curator note

Evaluate more than schema syntax: test authorization, data-loading behavior, and error responses with a small real query. If your design depends on GraphQL::Pro, confirm which capabilities sit outside the open-source runtime.

Try it in 3 steps

  1. 1

    Add graphql to an isolated bundle

    With Ruby 2.7 or newer and Bundler available, add v2.6.11 inside an empty evaluation directory.

    mkdir graphql-ruby-demo && cd graphql-ruby-demo && bundle init && bundle add graphql --version 2.6.11
  2. 2

    Create a minimal schema and query

    Define a query entry point and one field, then execute a query at the end of the same file.

    printf '%s\n' 'require "graphql"' 'class QueryType < GraphQL::Schema::Object' ' field :greeting, String, null: false' ' def greeting' ' "Hello from graphql-ruby"' ' end' 'end' 'class DemoSchema < GraphQL::Schema' ' query(QueryType)' 'end' 'puts DemoSchema.execute("{ greeting }").to_h' > demo.rb
  3. 3

    Inspect the query result

    Confirm that the output contains {"data"=>{"greeting"=>"Hello from graphql-ruby"}}.

    bundle exec ruby demo.rb
Check the official README

Growth

Growth trends · Last 30 days

5,444 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
65
Open PRs
18

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • ruby
  • graphql
  • relay
  • rails
  • graphql-ruby
  • hacktoberfest
Stars
5,444
Forks
1,419
Watchers
77
Open issues
50
Contributors
397
Owner type
User
Primary language
Ruby
License
MIT
Repository last updated
Oct 1, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?