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
For our backend REST API we are using HC graphql as BFF. Is there any way to solve the following situation using data loaders?
Let's say we have 2 services, Product and Price service. Our BFF has a graphql query that allows filtering by product number, price range. If the query contains a filter for the price range, we need to make a query to the Price service to filter the products prices in the desired range and then go to the Product service to retrieve those products.
The Graphql query returns a product, but the product object from the product service is extended to include a price and is retrieved by the PriceByProductNumberDataLoader. And here's the problem. We are querying the price service twice. The first time because of the filter, the second time because of the product extension. Is it possible to reuse the answer from the filter request in the data loader?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For our backend REST API we are using HC graphql as BFF. Is there any way to solve the following situation using data loaders?
Let's say we have 2 services, Product and Price service. Our BFF has a graphql query that allows filtering by product number, price range. If the query contains a filter for the price range, we need to make a query to the Price service to filter the products prices in the desired range and then go to the Product service to retrieve those products.
The Graphql query returns a product, but the product object from the product service is extended to include a price and is retrieved by the PriceByProductNumberDataLoader. And here's the problem. We are querying the price service twice. The first time because of the filter, the second time because of the product extension. Is it possible to reuse the answer from the filter request in the data loader?
Beta Was this translation helpful? Give feedback.
All reactions