Easily mount GraphQL Voyager on your rails app.
Mount GraphQL Voyager in your config/routes.rb
:
mount Graphql::Voyager::Rails::Engine, at: "/graphql-voyager", graphql_path: "/graphql"
Precompile assets in your config/application.rb
:
config.assets.precompile += [
'graphql/voyager/rails/application.css',
'graphql/voyager/rails/application.js',
'graphql/voyager/rails/voyager.js'
]
Now you should be able to access GraphQL Voyager at: http://localhost:3000/graphql-voyager
.
Add this line to your application's Gemfile:
gem 'graphql-voyager-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install graphql-voyager-rails
Pull requests are always welcome.
The gem is available as open source under the terms of the MIT License.
Gem originally based off on GraphiQL Rails and of course GraphQL Voyager.