The documentation online for all available graphql API versions mentions province
as a field on MailingAddressInput
, which is what we’ve been using.
But if I run an introspection query against 2024-01 or later in the Shopify GraphiQL app to grab the schema, it’s showing that province
is gone and instead there is provinceCode
…
just wondering which is correct and if it’s provinceCode, how does that relate to province that we were using previously? Can we put the full province (state) name in there? or not?
the GraphiQL inspected docs from the schema
You are comparing two different APIs. In the docs screenshot, you appear to be looking at the Storefront API 2024-01, but then in Shopify GraphiQL App, using the Admin API. Beyond versions, these different APIs have slightly different definitions for MailingAddressInput
.
In 2018, Admin API introduced provinceCode
as a more precise province
input to solve issues related to internationalized values (i.e. using a localized variation of a province name vs the Anglicized variation).
Admin’s province
is deprecated but still valid for backwards compatibility. GraphiQL is not showing deprecated input fields. Introspection queries may not be asking for deprecated fields, depends on how the query was written.
1 Like
Appreciate the response Rob!
I’m looking at SubscriptionDeliveryMethodShippingInput - GraphQL Admin which references MailingListInput
in 2024-01 there was a province
field, now it’s provinceCode
. In 2024-04 provinceCode
seems to be required now when modifying subscription contracts. This wasn’t documented anywhere in the breaking changes 2024-04 release notes