A blatant copy of GraphiQL::Rails with much less functionality but with GraphQL Playground instead.
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.
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 installAdd 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 endSubmit a PR.
The gem is available as open source under the terms of the MIT License.