Class: GraphQL::Dataloader::NullDataloader
- Inherits:
-
GraphQL::Dataloader
- Object
- GraphQL::Dataloader
- GraphQL::Dataloader::NullDataloader
- 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.
Instance Attribute Summary
Attributes inherited from GraphQL::Dataloader
Instance Method Summary collapse
-
#append_job ⇒ Object
-
#clear_cache ⇒ Object
-
#initialize ⇒ NullDataloader
constructor
These are all no-ops because code was executed synchronously.
-
#run ⇒ Object
-
#run_isolated ⇒ Object
-
#with ⇒ Object
-
#yield(_source) ⇒ Object
Methods inherited from GraphQL::Dataloader
#cleanup_fiber, #get_fiber_variables, #merge_records, #nonblocking?, #run_fiber, #set_fiber_variables, #spawn_fiber, use, with_dataloading
Constructor Details
#initialize ⇒ NullDataloader
These are all no-ops because code was executed synchronously.
13 |
# File 'lib/graphql/dataloader/null_dataloader.rb', line 13 def initialize(*); end |
Instance Method Details
#append_job ⇒ Object
21 22 23 24 |
# File 'lib/graphql/dataloader/null_dataloader.rb', line 21 def append_job yield nil end |
#clear_cache ⇒ Object
16 |
# File 'lib/graphql/dataloader/null_dataloader.rb', line 16 def clear_cache; end |
#run ⇒ Object
14 |
# File 'lib/graphql/dataloader/null_dataloader.rb', line 14 def run; end |
#run_isolated ⇒ Object
15 |
# File 'lib/graphql/dataloader/null_dataloader.rb', line 15 def run_isolated; yield; end |