artsy / metaphysics

Artsy's GraphQL API
MIT License
360 stars 89 forks source link

chore: always use sale's database id when querying saleArtworkLoader #5994

Closed mzikherman closed 1 week ago

mzikherman commented 1 week ago

This may not improve performance from end-user perspectives since backend requests from MP are parallelized. Removing unnecessary ones I think always makes sense since you keep all the equivalent data that's being queried, but less requests.

In this case, I went through uses of this loader, and made sure we were consistent in the arguments being used. This prevents a query from being issued which results in two separate requests which actually are identical (but can't be combined by data loader due to different arguments).