Closed haines closed 3 years ago
Thank you very much for the detail explanation and test case.
Due to change in 1.12.4
, now the search objects class, requires the inheritance of GraphQL::Schema::Resolver
:
-- class PostResolver
++ class PostResolver < GraphQL::Schema::Resolver
include SearchObject.module(:graphql)
type [PostType], null: false
scope { Post.all }
option :name, type: String do |scope, value|
scope.select { |post| post.name == value }
end
end
I updated the documentation and will be releasing 1.0.0
which will make sure users are warned about this.
https://github.com/rmosolgo/graphql-ruby/pull/3320 breaks
SearchObject::Plugin::GraphQL
, because including the plugin does not result in thevalidate_directive_argument
class method being defined on the resolver.Here's a script to reproduce:
This works with graphql-ruby 1.12.3:
But fails on graphql-ruby 1.12.4: