No release in over 3 years
Low commit activity in last 3 years
GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 5.0.0, ~> 5.0
~> 1.3, >= 1.3.11

Runtime

>= 5.0.0, ~> 5.0
 Project Readme

GraphQL Playground

Mount the GraphQL Playground in Ruby on Rails.

Requirement

Rails >= 5.2.0

Installation

Add this line to your application's Gemfile:

gem 'graphql-playground'

And then execute:

$ bundle

Or install it yourself as:

$ gem install graphql-playground

Usage

Mount the Engine

Add the engine to routes.rb:

# config/routes.rb
Rails.application.routes.draw do
  # ...
  if Rails.env.development?
    mount GraphQL::Playground::Engine, at: "/graphql-playground", graphql_path: "/graphql"
  end
end
  • at: is the path where GraphQL Playground will be served. You can access GraphQL Playground by visiting that path in your app.
  • graphql_path: is the path to the GraphQL endpoint. GraphQL Playground will send queries to this path.

If you're using Rails 5 in "API mode", you'll also need to add require "sprockets/railtie" to your application.rb.

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.