Closed tmikoss closed 4 years ago
I have the same issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Any suggestions where to start debugging this issue?
Hey guys,
This issue is related to this one https://github.com/exAspArk/graphql-guard/issues/28#issuecomment-511448728. I won't be adding support for the new Interpreter
as long as the graphql
gem has this feature in the experimental status:
I would like to avoid making unnecessary breaking changes from one graphql
gem version to another. But feel free to open a PR if you want to contribute and help other people :)
Thanks for the update, makes sense. Had not noticed the Interpreter
is still marked as experimental. Being included in generate graphql:install
output made me sure it was the new default.
@tmikoss yeah, it was marked as experimental for a while now. Please wake me up once the Interpreter
is stable :smile_cat:
Hi @exAspArk,
The latest version brings new runtime as a stable feature. Can you consider to update package?
I have the same issue
Using:
graphql (1.10.4)
graphql-batch (0.4.2)
graphql (>= 1.3, < 2)
promise.rb (~> 0.7.2)
graphql-errors (0.4.0)
graphql (>= 1.6.0, < 2)
graphql-guard (1.3.1)
graphql (>= 1.6.0, < 2)
graphql-query-resolver (0.2.0)
graphql (~> 1.0, >= 1.0.0)
graphql-rails_logger (1.2.2)
class MyApiSchema < GraphQL::Schema
mutation(Types::MutationType)
query(Types::QueryType)
# Opt in to the new runtime (default in future graphql-ruby versions)
use GraphQL::Execution::Interpreter
use GraphQL::Analysis::AST
# Add built-in connections for pagination
use GraphQL::Pagination::Connections
use GraphQL::Batch
use GraphQL::Guard.new(policy_object: GraphqlPolicy)
end
It works when remove the
use GraphQL::Execution::Interpreter
use GraphQL::Analysis::AST
I've finally made graphql-guard
work with the latest graphql
gem version and Interpreter
. I'd appreciate if someone would like to give it a try https://github.com/exAspArk/graphql-guard/pull/39 😉
# in your Gemfile
gem 'graphql-guard', github: 'exAspArk/graphql-guard', branch: 'graphql-interpreter'
graphql
gem v1.10 addsGraphQL::Execution::Interpreter
by default in newly generated schemas, and that somehow sidestepsgraphql-guard
. For example, with following configuration:the query
is successful. After commenting out
block, the same query returns an error, as expected.