Mount the GraphiQL Engine in Rails routes
masterTo serve the GraphiQL IDE, mount the GraphiQL::Rails::Engine in your config/routes.rb file. It is recommended to wrap this in a development environment check.
Use the following options:
at:: The URL path where the GraphiQL interface will be served.graphql_path:: The URL path of your existing GraphQL endpoint where GraphiQL will send queries.
# config/routes.rb
Rails.application.routes.draw do
# ...
if Rails.env.development?
mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/your/endpoint"
end
end