Method: GraphQL::Schema::Resolver.null
- Defined in:
- lib/graphql/schema/resolver.rb
.null(allow_null = nil) ⇒ Object
If true (default), then the return type for this resolver will be nullable.
If false, then the return type is non-null.
319 320 321 322 323 324 325 |
# File 'lib/graphql/schema/resolver.rb', line 319 def null(allow_null = nil) if !allow_null.nil? @null = allow_null end @null.nil? ? (superclass.respond_to?(:null) ? superclass.null : true) : @null end |