Introduction
For Shopify stores that have the Rye Shopify app installed, some Rye API operations support localization for price value and currency. This means that you can use the Rye API to get the price value and currency in the language and currency that the customer prefers. To enable localization, you should use the@inContext GraphQL directive that includes information about the preferred country. Note that the Shopify store must have local currencies enabled for this feature to work within Rye.
GraphQL Directive
For localization, the Rye API expects the use of the@inContext directive in your GraphQL queries or mutations. This directive takes a country as an argument and converts prices within the query/mutation responses into the specified country’s currency.
Example request and response without localization (default USD)
Example request and response with localization (CAD)
Supported operations
- The
integratedShopifyStorequery - The
shopifyCollectionquery - The
productByIDquery - The
productsByIdsquery

