Customer 'sms_marketing_consent' field from REST API is missing in GraphQL

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 :waving_hand:

In GraphQL, we can use the Customer.smsMarketingConsent field.

Hope that helps!

1 Like