Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

ShopifyQL orders returns empty response

ShopifyQL orders returns empty response

mimi33
Excursionist
15 1 5

I am trying to use ShopifyQL so we can analyze data on our end

Following the documentation, I executed the code on my Shopify GraphiQL app

https://shopify.dev/api/admin-graphql/2023-01/queries/shopifyqlQuery#examples-Get_a_table_data_respo...

 

However as seen in the screenshot, there are no orders returned (we do have orders).

Is this something wrong in the code I pasted, or is the orders table broken?

 

mimi33_0-1670737788154.png

 

Replies 21 (21)

ShopifyDevSup
Shopify Staff
1453 238 524

Hi @mimi33 - that query does look like it should work and I've successfully tested it on one of my test stores. At the moment, making ShopifyQL queries through the admin API is only available on the release candidate and unstable versions of of our Admin API. We don't usually recommend relying on experimental features until they are rolled out in full releases.

That said, it is odd that it's not returning expected data. Since we'd have to talk about some sensitive store-related info, could you reach out to either our partner support or merchant support team through this link here? When you reach out, just refer to and share my post here and mention that you are reporting an issue with ShopifyQL. They should be able to get you in touch with one of our technical teams who can look into this for you on a store-level. 

Hope this 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

cynthia9
Visitor
2 0 1

I'm facing the same issue and upon contacting support they say I should talk to a shopify expert. While the issue seems to be with shopify API itself.

svickers
Shopify Partner
3 0 2

I am seeing the same issue as well trying to go through this tutorial: https://shopify.github.io/workshops/codelabs/shopifyql-with-polaris-viz/index.html?index=./workshops... but nothing is returned from orders.

I can successfully execute queries on products like

FROM products show product_id

 

returns a list of product_ids, but:

FROM orders show order_id

returns no data.

 

ShopifyDevSup
Shopify Staff
1453 238 524

Hi @mimi33 👋

I'd recommend checking that your app has all the necessary access scopes to start. You can fetch them using the `currentInstallation` query as shown below:

 

 

{
    currentAppInstallation {
        accessScopes {
            handle
        }
    }
}

 


From my testing, the same `shopifyqlQuery` example on an app with appropriate scopes appears to yield the orders table data successfully. If the issue persists despite having the required scopes, please share a X-Request-ID (and timestamp) from the last 7 days and we would be happy to take a closer look.

 

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

svickers
Shopify Partner
3 0 2

I am running the query from within the Shopify GraphQL App and I have granted all scopes, here is the response for accessScopes:

 

 "accessScopes": [
{
"handle": "write_content"
},
{
"handle": "write_themes"
},
{
"handle": "write_checkout_branding_settings"
},
{
"handle": "write_products"
},
{
"handle": "write_product_listings"
},
{
"handle": "write_customers"
},
{
"handle": "write_draft_orders"
},
{
"handle": "write_script_tags"
},
{
"handle": "write_inventory"
},
{
"handle": "write_fulfillments"
},
{
"handle": "write_assigned_fulfillment_orders"
},
{
"handle": "write_merchant_managed_fulfillment_orders"
},
{
"handle": "write_third_party_fulfillment_orders"
},
{
"handle": "write_checkouts"
},
{
"handle": "write_reports"
},
{
"handle": "write_price_rules"
},
{
"handle": "write_marketing_events"
},
{
"handle": "write_resource_feedbacks"
},
{
"handle": "read_analytics"
},
{
"handle": "read_all_orders"
},
{
"handle": "write_orders"
},
{
"handle": "write_channels"
},
{
"handle": "read_apps"
},
{
"handle": "write_translations"
},
{
"handle": "write_locales"
},
{
"handle": "write_discounts"
},
{
"handle": "write_shipping"
},
{
"handle": "write_order_edits"
},
{
"handle": "write_legal_policies"
},
{
"handle": "write_payment_customizations"
},
{
"handle": "write_delivery_customizations"
},
{
"handle": "unauthenticated_read_product_listings"
},
{
"handle": "unauthenticated_read_product_tags"
},
{
"handle": "unauthenticated_write_checkouts"
},
{
"handle": "unauthenticated_write_customers"
},
{
"handle": "unauthenticated_read_customer_tags"
},
{
"handle": "unauthenticated_read_content"
},
{
"handle": "read_content"
},
{
"handle": "read_themes"
},
{
"handle": "read_checkout_branding_settings"
},
{
"handle": "read_products"
},
{
"handle": "read_product_listings"
},
{
"handle": "read_customers"
},
{
"handle": "read_draft_orders"
},
{
"handle": "read_script_tags"
},
{
"handle": "read_inventory"
},
{
"handle": "read_fulfillments"
},
{
"handle": "read_assigned_fulfillment_orders"
},
{
"handle": "read_merchant_managed_fulfillment_orders"
},
{
"handle": "read_third_party_fulfillment_orders"
},
{
"handle": "read_checkouts"
},
{
"handle": "read_reports"
},
{
"handle": "read_price_rules"
},
{
"handle": "read_marketing_events"
},
{
"handle": "read_resource_feedbacks"
},
{
"handle": "read_orders"
},
{
"handle": "read_channels"
},
{
"handle": "read_translations"
},
{
"handle": "read_locales"
},
{
"handle": "read_discounts"
},
{
"handle": "read_shipping"
},
{
"handle": "read_order_edits"
},
{
"handle": "read_legal_policies"
},
{
"handle": "read_payment_customizations"
},
{
"handle": "read_delivery_customizations"
},
{
"handle": "unauthenticated_read_checkouts"
},
{
"handle": "unauthenticated_read_customers"
}
]

It looks like every required scope from the docs are accounted for.

qinshi
Shopify Partner
9 0 3

Hi, I got the same issue, when I try to get order data it return empty, but it works when I try to get product data, any suggestion?Thanks!

access.pngorder.pngproduct.png

ShopifyDevSup
Shopify Staff
1453 238 524

Hi @qinshi 👋


Would you kindly confirm whether you're testing this on a partner development store?

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

qinshi
Shopify Partner
9 0 3

Hi @ShopifyDevSup 

 

Yes, I am testing this on my development store, it's name is fetch-light, and it dose have orders. Please have a check. Thanks!

 

 

stores.png

 

store-order.png

 

orders.png

CAPSULE_D2C
Shopify Partner
2 0 1

Hello all,

 

Same issue for us. Same Permissions. Different queries not work. Only return "€0.00" if we have sum in the query.

Products return data but not Orders.

qinshi
Shopify Partner
9 0 3

I'm blocking here, can anybody help?

ShopifyDevSup
Shopify Staff
1453 238 524

Thanks for confirming that you're testing ShopifyQL on a development store. At this time, ShopifyQL is only available on live stores, so it would be expected that querying a development store would return 0 values in the orders tables.

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

qinshi
Shopify Partner
9 0 3

Hi @ShopifyDevSup 

 

Thanks for your answer, and is there any solution if we want to test ShopifyQL on a development store now?

ShopifyDevSup
Shopify Staff
1453 238 524

Hi all,

 

Our developers have updated our documentation to clarify that it is only available to Plus merchant stores for now.

 

We do not currently have a solution for partners looking to test on a development store, but thank for all of your feedback!

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

Sweedy
Shopify Partner
2 0 0

Does this extend to live stores as well or is this just for development?

In other words, is ShopifyQL available to exclusively Plus merchant stores in general or can "lower tier" live stores use it?

ShopifyDevSup
Shopify Staff
1453 238 524

At this time, ShopifyQL is available only on live merchant stores on a Plus plan.

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

Joey_Sturgis
New Member
12 0 0

Is this still true?

bluesky0724
Shopify Partner
2 0 1

Hi @ShopifyDevSup 
Could you please update any answer here?

I am also facing this issue.

Issue is on both development store and production store.

Thank you

Joey_Sturgis
New Member
12 0 0
I was informed a while ago by Shopify that this only works on Shopify Plus
accounts. This may or may not still be true.
CAPSULE_D2C
Shopify Partner
2 0 1

Hello,

 

That not working too with store in production.

 

Best regards

svickers
Shopify Partner
3 0 2

Yes, trying it on a development store.

Sweedy
Shopify Partner
2 0 0

Same issue here, has anyone managed to find a solution?