Module: GraphQL::Autotest::Util

Extended by:
Util
Included in:
Util
Defined in:
lib/graphql/autotest/util.rb

Instance Method Summary collapse

Instance Method Details

#non_null?(type) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/graphql/autotest/util.rb', line 6

def non_null?(type)
  type.is_a?(GraphQL::Language::Nodes::NonNullType)
end

#unwrap(type) ⇒ Object



10
11
12
13
14
# File 'lib/graphql/autotest/util.rb', line 10

def unwrap(type)
  return type unless type.respond_to?(:of_type)

  unwrap(type.of_type)
end