GraphQL missing fields compared to REST

I might be late to the game on this one. Hopefully it’s an easy answer.

I’m porting from REST to GraphQL and I’m discovering that REST returns more data than is available in GraphQL (or I’m not understanding GraphQL well enough)

Example:

From Shop you can get “phone” and “shop_owner”

https://help.shopify.com/en/api/reference/store-properties/shop#properties

With GraphQL, I can’t figure out how to get these fields

https://help.shopify.com/en/api/custom-storefronts/storefront-api/reference/object/shop#fields

suggestions?

2 Likes

Hey Josh,

I don’t think this is you not understanding well enough - looks like you’re right. At this point I can only recommend using REST when you need to get those fields, but I’ll ask around internally here and see if we can get those added.

Thanks for pointing this out!

Hey again Josh,

Just wanted to follow up on this with some additional information - I tracked down the phone number, it was hidden under the shop’s billingAddress. Here’s an example query that can grab that for you :

{
  shop {
    name
    myshopifyDomain
    billingAddress {
      id
      phone
    }
  }
}

However, the ‘shop_owner’ isn’t available right now - we’re looking into rectifying that as we speak.

1 Like

Awesome. Thank you!

I too am looking for shop_owner which was available in REST API but surprisingly missing from GraphQL. It has been several months since this issue has been brought to notice.. Any update on this?

1 Like

Hey guys,

The shop owner information isn’t available via GraphQL publicly right now because the way that it is used surfaces some fields that should not be available in a public API. This is still a work in progress, but please continue to check in here for any updates and I’ll do my best to let you keep you both posted.

1 Like

Is there any update on the availability of shop_owner in GraphQL?

Seems to be available on the graphql api https://shopify.dev/api/admin/rest/reference/store-properties/shop#properties , maybe you are looking at the storefront api.

That’s the REST reference, I’m looking for it in GraphQL:

https://shopify.dev/api/admin/graphql/reference/store-properties/shop#fields-2021-07

It has fields for email and contactEmail, but nothing equivalent to shop_owner.

Hello Josh, rather than create a new ticket I wanted to mention that I’m running into similar issues with some of the REST fields missing in GraphQL:

The REST API has ‘sms_marketing_consent’, but it’s missing in theGraphQL 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 you guys could get this added to theGraphQL API? It would be helpful for people that need to do pagination and bulk queries for lists larger than 250 since you have to build your own throttle using the REST API, but don’t have to with GraphQL.

Hi @locomojo :waving_hand:

The Customer.smsMarketingConsent field in GraphQL should work in place of sms_marketing_consent in REST.

Hope that helps!

Hey, any plans to introduce the shop_owner field to graphql in the next release?

1 Like