How to map referring_site in shopify from rest to graphql. Getting null or different values in graphQl. Does rest provide the values for every order?
Topic summary
A developer is attempting to migrate from Shopify’s REST API to GraphQL and encountering issues mapping the referring_site field. They’re getting null or inconsistent values in GraphQL compared to REST.
Key findings:
- In REST API,
referring_siteis available only for online store orders and frequently returns null - In GraphQL, the equivalent field is
customerJourney.firstVisit.referrerUrl - Important limitation: This GraphQL field is only accessible on Shopify Plus plans
For merchants not on Shopify Plus, there is no direct way to access referring site data through GraphQL. The discussion confirms REST does provide values for orders, but availability depends on the order source.
Hi Rishav,
Yes. In REST, referring_site is available only for online store orders and may often be null. In GraphQL, the closest equivalent is customerJourney.firstVisit.referrerUrl, but it’s only available on Shopify Plus. If you’re not on Plus, this data isn’t directly accessible via GraphQL.
Thanks