Class: GraphQL::DefinitionHelpers::TypeDefiner
- Inherits:
-
Object
- Object
- GraphQL::DefinitionHelpers::TypeDefiner
- Includes:
- Singleton
- Defined in:
- lib/graphql/definition_helpers/type_definer.rb
Overview
Some conveniences for definining return & argument types.
Passed into initialization blocks, eg ObjectType#initialize, Field#initialize
Instance Method Summary collapse
-
#[](type) ⇒ GraphQL::ListType
Make a ListType which wraps the input type.
- #Boolean ⇒ Object
- #Float ⇒ Object
- #ID ⇒ Object
- #Int ⇒ Object
- #String ⇒ Object
Instance Method Details
#[](type) ⇒ GraphQL::ListType
Make a ListType which wraps the input type
22 23 24 |
# File 'lib/graphql/definition_helpers/type_definer.rb', line 22 def [](type) type.to_list_type end |
#Boolean ⇒ Object
10 |
# File 'lib/graphql/definition_helpers/type_definer.rb', line 10 def Boolean; GraphQL::BOOLEAN_TYPE; end |
#Float ⇒ Object
9 |
# File 'lib/graphql/definition_helpers/type_definer.rb', line 9 def Float; GraphQL::FLOAT_TYPE; end |
#ID ⇒ Object
11 |
# File 'lib/graphql/definition_helpers/type_definer.rb', line 11 def ID; GraphQL::ID_TYPE; end |
#Int ⇒ Object
7 |
# File 'lib/graphql/definition_helpers/type_definer.rb', line 7 def Int; GraphQL::INT_TYPE; end |
#String ⇒ Object
8 |
# File 'lib/graphql/definition_helpers/type_definer.rb', line 8 def String; GraphQL::STRING_TYPE; end |