Class: GraphqlMigrateExecution::TypeDefinition
- Inherits:
-
Object
- Object
- GraphqlMigrateExecution::TypeDefinition
- Defined in:
- lib/graphql_migrate_execution/type_definition.rb
Instance Attribute Summary collapse
-
#field_definitions ⇒ Object
readonly
Returns the value of attribute field_definitions.
-
#is_interface ⇒ Object
Returns the value of attribute is_interface.
-
#is_resolver ⇒ Object
Returns the value of attribute is_resolver.
-
#migration ⇒ Object
Returns the value of attribute migration.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resolver_methods ⇒ Object
readonly
Returns the value of attribute resolver_methods.
Instance Method Summary collapse
- #field_definition(name, node) ⇒ Object
-
#initialize(name, migration) ⇒ TypeDefinition
constructor
A new instance of TypeDefinition.
- #resolver_method(name, node) ⇒ Object
- #returns_hash? ⇒ Boolean
- #returns_string_hash? ⇒ Boolean
Constructor Details
#initialize(name, migration) ⇒ TypeDefinition
Returns a new instance of TypeDefinition.
4 5 6 7 8 9 10 11 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 4 def initialize(name, migration) @name = name @migration = migration @field_definitions = {} @resolver_methods = {} @is_resolver = false @is_interface end |
Instance Attribute Details
#field_definitions ⇒ Object (readonly)
Returns the value of attribute field_definitions.
15 16 17 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 15 def field_definitions @field_definitions end |
#is_interface ⇒ Object
Returns the value of attribute is_interface.
13 14 15 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 13 def is_interface @is_interface end |
#is_resolver ⇒ Object
Returns the value of attribute is_resolver.
13 14 15 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 13 def is_resolver @is_resolver end |
#migration ⇒ Object
Returns the value of attribute migration.
13 14 15 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 13 def migration @migration end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 15 def name @name end |
#resolver_methods ⇒ Object (readonly)
Returns the value of attribute resolver_methods.
15 16 17 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 15 def resolver_methods @resolver_methods end |
Instance Method Details
#field_definition(name, node) ⇒ Object
17 18 19 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 17 def field_definition(name, node) @field_definitions[name] = FieldDefinition.new(self, name, node) end |
#resolver_method(name, node) ⇒ Object
21 22 23 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 21 def resolver_method(name, node) @resolver_methods[name] = ResolverMethod.new(name, node) end |
#returns_hash? ⇒ Boolean
25 26 27 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 25 def returns_hash? @resolver_methods.each_value.first.returns_hash? end |
#returns_string_hash? ⇒ Boolean
29 30 31 |
# File 'lib/graphql_migrate_execution/type_definition.rb', line 29 def returns_string_hash? @resolver_methods.each_value.first.returns_string_hash? end |