-
To reduce amount of requests to database when partial data was requested it's nice to use dataloader, but if query made in database transaction is it possible to pass this transaction to dataloader? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Imagine multiple clients are making parallel requests (1s bucket) to the GraphQL API. A global-scoped A request-scoped |
Beta Was this translation helpful? Give feedback.
So you have a scope with selection fields in the form
scope { user { ... } friends { ... } }
.You would like the whole tree to be fetched during the same transaction, starting from the
scope
node and progressing into the inner fields.I don't think you need a
Dataloader
, just the shared transaction for inner resolvers: