Graphiql Rails
Mount the GraphiQL query editor in a Rails app
No ratings yet
- Gem
- graphiql-rails
- Repository
- rmosolgo/graphiql-rails
- License
- MIT
- Stars
- 452
- Added
- August 22, 2026
About
Mount the GraphiQL query editor in a Rails app
You can override GraphiQL::Rails.config values in an initializer (eg, config/initializers/graphiql.rb). The configs are:
What you get
query_params(boolean, defaultfalse): iftrue, the GraphQL query string will be persisted the page's query paramsinitial_query(string, defaultnil): if provided, it will be rendered in the query pane for a visitor's first visittitle(string, defaultnil): if provided, it will be rendered in the page taglogo(string, defaultnil): if provided, it will be the text logocsrf(boolean, defaulttrue): includeX-CSRF-Tokenin GraphiQL's HTTP requestsheader_editor_enabled(boolean, defaultfalse): if provided, the header editor will be rendered
Mounting it
ruby
# Gemfile
gem "graphiql-rails"
# config/routes.rb
mount GraphiQL::Rails::Engine, at: "/graphiql"
Details
452 stars on GitHub · MIT licensed · maintained by rmosolgo. Source: https://github.com/rmosolgo/graphiql-rails
Discussion (0)
Sign in to join the discussion.
No comments yet.