Currently, there is no explicit property on the Location object in the Admin GraphQL API that indicates whether a location is a legacy location. Legacy locations can only be inferred by using the includeLegacy
argument in the locations
query, but there is no way to distinguish them from standard locations in the response.
We need to make two quries to locations
, one to with includeLegacy: false
and includeLegacy: true
to identify which locations are legacy locations.
Proposed solution:
- Add an
isLegacy: Boolean!
field to the Location object in the Admin GraphQL API.
If I’ve missed something entirely obvious, please let me know!
You’re correct - cross-referencing the results from these two queries is currently the only way to identify which locations are legacy locations. I can create a feature request for this - could you provide any details on the usecase this would enable for you, so we can determine the priority for building support for this?
Thanks for the reply Liam!
We provide a UI for activating bundle products at specific locations, as Shopify doesn’t activate them across all locations automatically (which can cause contextual availability issues with Markets).
As some legacy locations have certain requirements, we need to flag that they may not activate as expected to the user.
Making two calls to get this data isn’t efficient (especially if a store has 200 locations).