GraphQL::Dataloader
instances are created for each query (or multiplex) and they:
During a query, you can access the dataloader instance with:
GraphQL::Query::Context#dataloader
(context.dataloader
, anywhere that query context is available)GraphQL::Schema::Object#dataloader
(dataloader
inside a resolver method)GraphQL::Schema::Resolver#dataloader
(dataloader
inside def resolve
of a Resolver, Mutation, or Subscription class.)