Module: GraphQL::Execution::Lazy::Resolve::NullAccumulator Private

Defined in:
lib/graphql/execution/lazy/resolve.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

This object can be passed like an array, but it doesn't allocate an array until it's used.

There's one crucial difference: you have to capture the result of #<<. (This works with arrays but isn't required, since it has a side-effect.)

Class Method Summary collapse

Class Method Details

.<<(item) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


18
19
20
# File 'lib/graphql/execution/lazy/resolve.rb', line 18

def self.<<(item)
  [item]
end

.empty?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


22
23
24
# File 'lib/graphql/execution/lazy/resolve.rb', line 22

def self.empty?
  true
end