Sha256: 321b56deb4fde6907d94da56d3567ead24a0aa45e6b855a3f8a56441f6aaab74

Contents?: true

Size: 677 Bytes

Versions: 64

Compression:

Stored size: 677 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
      # These are all no-ops because code was
      # executed sychronously.
      def run; end
      def run_isolated; yield; end
      def yield
        raise GraphQL::Error, "GraphQL::Dataloader is not running -- add `use GraphQL::Dataloader` to your schema to use Dataloader sources."
      end

      def append_job
        yield
        nil
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
graphql-2.0.23 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.22 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.21 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.20 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.17.2 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.17.1 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.19 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.18 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.17 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.16 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.15 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.14 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.13 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.12 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.11 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.9 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.8 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.7 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.6 lib/graphql/dataloader/null_dataloader.rb
graphql-2.0.5 lib/graphql/dataloader/null_dataloader.rb