Skip to content

bigbinary/graphql_playground-rails

 
 

Repository files navigation

Gem Version

GraphqlPlayground::Rails

A blatant copy of GraphiQL::Rails with much less functionality but with GraphQL Playground instead.

Reason for fork

Graphql playground gem uses Rails version 5.1. We had a requirement in one of the project to use the Rails version lesser than 5.1 so we forked to gem repository and downgraded the rails version to 5.0.7.

Installation

Add this line to your application's Gemfile:

# GraphQL Playground for query editor in a Rails.
gem 'graphql_playground-rails', github: 'bigbinary/graphql_playground-rails'

And then execute:

$ bundle install

Mount the Engine

Add the engine to routes.rb:

# config/routes.rb
Rails.application.routes.draw do
  # ...
  if Rails.env.development?
    mount GraphqlPlayground::Rails::Engine, at: "/graphql_playground", graphql_path: "/your/endpoint"
  end
end

Contributing

Submit a PR.

License

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

Packages

No packages published

Languages

  • Ruby 50.7%
  • CSS 25.8%
  • HTML 20.8%
  • JavaScript 2.7%