feat: add locale override parameter to client.fetch#2361
Conversation
🦋 Changeset detectedLatest commit: 9e1ad83 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
Allows passing a `locale` that will be used to set the outgoing `"Accept-Language"` header sent to the BigCommerce Storefront GraphQL API
fc0091c to
9e1ad83
Compare
|
Converted to draft; discussed with the team, and we should either more appropriately name this parameter based on what it is actually doing (overriding |
|
I'm going to go the route of not modifying the client. Feels aggressive to extend the client's API just for the one case needed in #2286 |
What/Why?
Allows passing a
localethat will be used to set the outgoing"Accept-Language"header sent to the BigCommerce Storefront GraphQL API. This additional, optional parameter gives you more explicit control over what language you'd like responses to be translated into, leveraging BigCommerce's resolved locale feature.Note
This PR originated from #2286
Testing
N/A - Additive change
Migration
0.16or higher, so a simple version bump should suffice.pnpmworkspaces, simply cherry-pick the additive diff from this PR into your branch.