Class: Rails::GraphQL::Alternative::Query
- Inherits:
-
Object
- Object
- Rails::GraphQL::Alternative::Query
- Extended by:
- Helpers::WithNamespace
- Includes:
- Helpers::Instantiable
- Defined in:
- lib/rails/graphql/alternative/query.rb
Overview
GraphQL Alternative Query
This object acts like a field, but is organized as an object for extended resolvers or really complex fields.
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Helpers::Instantiable
Class Method Summary collapse
-
.field ⇒ Object
Stores the underlying field of the object.
-
.i18n_scope ⇒ Object
Alias does not work because of the override.
- .inspect ⇒ Object
-
.type_field_class ⇒ Object
Returns the type of the field class.
Methods included from Helpers::WithNamespace
namespace, namespaces, set_namespace
Class Method Details
.field ⇒ Object
Stores the underlying field of the object
33 34 35 36 37 |
# File 'lib/rails/graphql/alternative/query.rb', line 33 def field return @field if defined?(@field) return define_field unless superclass.instance_variable_defined?(:@field) import_field(superclass.field) end |
.i18n_scope ⇒ Object
Alias does not work because of the override
28 29 30 |
# File 'lib/rails/graphql/alternative/query.rb', line 28 def i18n_scope(*) type_field_class end |
.inspect ⇒ Object
39 40 41 |
# File 'lib/rails/graphql/alternative/query.rb', line 39 def inspect defined?(@field) ? @field.inspect : super end |
.type_field_class ⇒ Object
Returns the type of the field class
23 24 25 |
# File 'lib/rails/graphql/alternative/query.rb', line 23 def type_field_class :query end |