class GraphQL::Define::TypeDefiner

Some conveniences for definining return & argument types.

Passed into initialization blocks, eg {ObjectType#initialize}, {Field#initialize}

Public Instance Methods

Boolean() click to toggle source
# File lib/graphql/define/type_definer.rb, line 13
def Boolean;  GraphQL::DEPRECATED_BOOLEAN_TYPE;  end
Float() click to toggle source
# File lib/graphql/define/type_definer.rb, line 12
def Float;    GraphQL::DEPRECATED_FLOAT_TYPE;    end
ID() click to toggle source
# File lib/graphql/define/type_definer.rb, line 14
def ID;       GraphQL::DEPRECATED_ID_TYPE;       end
Int() click to toggle source

rubocop:disable Naming/MethodName

# File lib/graphql/define/type_definer.rb, line 10
def Int;      GraphQL::DEPRECATED_INT_TYPE;      end
String() click to toggle source
# File lib/graphql/define/type_definer.rb, line 11
def String;   GraphQL::DEPRECATED_STRING_TYPE;   end
[](type) click to toggle source

Make a {ListType} which wraps the input type

@example making a list type

list_of_strings = types[types.String]
list_of_strings.inspect
# => "[String]"

@param type [Type] A type to be wrapped in a ListType @return [GraphQL::ListType] A ListType wrapping `type`

# File lib/graphql/define/type_definer.rb, line 26
def [](type)
  type.to_list_type
end