Is it possible to have a different value for $subQueryInput for each ID in $ids? Or do I need to query each ID separately? Assuming I can’t make changes to the server in the timeframe I’m being held to
Hi @sawmill! The value of the $subQueryInput argument in this example will be the same for each element in the items list. I believe you are correct that, given the stipulated server constraints, a separate query will be needed for each $ids / $subQueryInput combination.
@sawmill a caveat: I don’t know how you’re querying for the data and the min/max/median number of items for which you’re querying, which IMO is material to the strategy you’d want to use. But one option is to use a different data structure as a parameter:
In your server code, the items resolver would instantiate an Item resolver for each ItemIdWithSubQueryInput element in the argument list. For each element, the nested Item#subQuery resolver would be passed the SubQueryInput value as an argument.
This is just one potential approach. I don’t particularly like the tight coupling but at the same time, I don’t see a way around it.