graphql_authorize:ruby graphql字段的授权助手 源码
GraphqlAuthorize 这个gem允许您授权对graphql-fields(由定义)的访问。 安装 将此行添加到您的应用程序的Gemfile中: gem 'graphql_authorize' 然后执行: $ bundle 或自己安装为: $ gem install graphql_authorize 用法 您可以定义一个proc并将其传递给字段块内进行authorize : field :posts , types [ PostType ] do authorize lambda { | _obj , _args , context | current_us
下载地址
用户评论