Class: GraphQL::Dataloader::NullDataloader

Inherits:
GraphQL::Dataloader show all
Defined in:
lib/graphql/dataloader/null_dataloader.rb

Overview

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.

Constant Summary

Constants inherited from GraphQL::Dataloader

AsyncDataloader

Instance Method Summary collapse

Methods inherited from GraphQL::Dataloader

#initialize, #join_queues, #nonblocking?, use, #with, with_dataloading

Constructor Details

This class inherits a constructor from GraphQL::Dataloader

Instance Method Details

#append_jobObject



16
17
18
19
# File 'lib/graphql/dataloader/null_dataloader.rb', line 16

def append_job
  yield
  nil
end

#runObject

These are all no-ops because code was executed sychronously.



12
# File 'lib/graphql/dataloader/null_dataloader.rb', line 12

def run; end

#run_isolatedObject



13
# File 'lib/graphql/dataloader/null_dataloader.rb', line 13

def run_isolated; yield; end

#yieldObject



14
# File 'lib/graphql/dataloader/null_dataloader.rb', line 14

def yield; end