Re: GraphQL missing fields compared to REST

GraphQL missing fields compared to REST

JoshHighland
Shopify Expert
212 12 76

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?

 

 

SEO Manager - The all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -
Replies 11 (11)

Josh
Shopify Staff
1134 84 234

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! 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Josh
Shopify Staff
1134 84 234

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. 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

JoshHighland
Shopify Expert
212 12 76

Awesome. Thank you!

SEO Manager - The all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -
amardeep
Shopify Partner
18 0 17

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?

Beautifully designed posts for social media. Inboxed daily!
Shopify App: Automatic Post Designer
Josh
Shopify Staff
1134 84 234

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.

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Connor_H
Visitor
2 0 0

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

Not applicable

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.

Connor_H
Visitor
2 0 0

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.

rohanrajpal
Shopify Partner
38 0 13

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

 

Founder | meetspur.com
Feel free to reach out to me at howdyrohan@gmail.com or @rohanrajpal98 on Twitter
locomojo
Shopify Partner
8 0 2

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. 

 

ShopifyDevSup
Shopify Staff
1451 238 497

Hi @locomojo 👋

 

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

 

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