You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
querygetOrders {
orders {
idactiveProducts: products(active: true) { id, name }
inactiveProducts: products(active: false) { id, name }
}
}
How would I configure this so that two instances of a ProductResolver are created, one for the activeProducts field, one for the inactiveProducts field, each taking in the active parameter.
I've had a look through the documentation and the source but I can't figure it out, it seems like only one instance of a DataLoader or a Resolver is created regardless of how many different fields resolve it.
How do I do this?
The text was updated successfully, but these errors were encountered:
How can a data loader or Resolver be separated by the field its resolving in a query, and take in additional parameters.
For example say I have the following schema:
And then the following query:
How would I configure this so that two instances of a
ProductResolver
are created, one for theactiveProducts
field, one for theinactiveProducts
field, each taking in theactive
parameter.I've had a look through the documentation and the source but I can't figure it out, it seems like only one instance of a DataLoader or a Resolver is created regardless of how many different fields resolve it.
How do I do this?
The text was updated successfully, but these errors were encountered: