A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
This is question directed towards Shopify staff. I'm running into issues with some of the REST fields missing in GraphQL.
The REST API for "Customers" has a "sms_marketing_consent" field, but it's missing in the GraphQL version.
REST version ('sms_marketing_consent' is here):
https://shopify.dev/api/admin-rest/2023-01/resources/customer
'sms_marketing_consent' is missing in GraphQL:
https://shopify.dev/api/admin-graphql/2023-01/queries/customer
Is there any chance we could get this added to GraphQL API? I'm simply trying to get a list of all customers that accept SMS marketing, and want to do it with GraphQL so I can do pagination and maybe even bulk queries since a lot of stores have more than 250 customers. I'm working with lists larger than 250 and don't want to build my own throttle using the REST API if I don't have to with GraphQL. Help?
Hi @locomojo 👋
In GraphQL, we can use the `Customer.smsMarketingConsent` field.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog