Sha256: 217a0e808454c07488fe83a509d0c079f931c8a17eca972e2255ad9e027a4ffd

Contents?: true

Size: 518 Bytes

Versions: 3

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  class Dataloader
    # The default implementation of dataloading -- all no-ops.
    #
    # The Dataloader interface isn't public, but it enables
    # simple internal code while adding the option to add Dataloader.
    class NullDataloader < Dataloader
      def enqueue
        yield
      end

      # These are all no-ops because code was
      # executed sychronously.
      def run; end
      def yield; end
      def yielded?(_path); false; end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
graphql-1.12.3 lib/graphql/dataloader/null_dataloader.rb
graphql-1.12.2 lib/graphql/dataloader/null_dataloader.rb
graphql-1.12.1 lib/graphql/dataloader/null_dataloader.rb