Module: SearchObject::Plugin::Graphql
- Defined in:
- lib/search_object/plugin/graphql.rb,
lib/search_object/plugin/graphql/version.rb
Defined Under Namespace
Modules: ClassMethods Classes: MissingTypeDefinitionError
Constant Summary collapse
- VERSION =
'0.3.2'
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(filters: {}, object: nil, context: {}, scope: nil, field: nil) ⇒ Object
-
#resolve_with_support(args = {}) ⇒ Object
NOTE(rstankov): GraphQL::Schema::Resolver interface Documentation - graphql-ruby.org/fields/resolvers.html#using-resolver.
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
12 13 14 |
# File 'lib/search_object/plugin/graphql.rb', line 12 def context @context end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
12 13 14 |
# File 'lib/search_object/plugin/graphql.rb', line 12 def object @object end |
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 |
# File 'lib/search_object/plugin/graphql.rb', line 6 def self.included(base) base.include SearchObject::Plugin::Enum base.include ::GraphQL::Schema::Member::GraphQLTypeNames base.extend ClassMethods end |
Instance Method Details
#initialize(filters: {}, object: nil, context: {}, scope: nil, field: nil) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/search_object/plugin/graphql.rb', line 14 def initialize(filters: {}, object: nil, context: {}, scope: nil, field: nil) @object = object @context = context super filters: filters, scope: scope, field: field end |
#resolve_with_support(args = {}) ⇒ Object
NOTE(rstankov): GraphQL::Schema::Resolver interface Documentation - graphql-ruby.org/fields/resolvers.html#using-resolver
23 24 25 26 |
# File 'lib/search_object/plugin/graphql.rb', line 23 def resolve_with_support(args = {}) self.params = args.to_h results end |