[英]How to enable header_editor_enable in graphiql-rails gem?
How can i set header_editor_enable
as true
in graphiql-rails gem?如何设置
header_editor_enable
为true
的graphiql护栏宝石? There is no graphiql config file in my project.我的项目中没有 graphiql 配置文件。 So, I've created it in
config/initializers/graphiql.rb
but I don't know how to set it true.所以,我在
config/initializers/graphiql.rb
创建了它,但我不知道如何将其设置为 true。
How can I do it?我该怎么做?
The change with header_editor_enable
is not released yet as of 02.12.2021. header_editor_enable
日, header_editor_enable
的更改尚未发布。 What you can do is change your Gemfile to point to the latest master of the gem你可以做的是改变你的 Gemfile 以指向 gem 的最新主人
# Gemfile
gem "graphiql-rails", git: "https://github.com/rmosolgo/graphiql-rails.git", branch: "master"
Then in your initializer, add header_editor_enabled
option as然后在您的初始化程序中,将
header_editor_enabled
选项添加为
# config/initializers/graphiql.rb
GraphiQL::Rails.config.header_editor_enabled = true
You are good to go你已准备好出发
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.