What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

GraphQL Internal Error

GraphQL Internal Error

mwex501
Shopify Partner
11 0 5

The following GraphQL query

 

 {
                orders(first: 10, query: \"processed_at:>=$processed_at_min processed_at:<$processed_at_max\") {
                        edges {
                                node {
                                        id
                                        purchasingEntity {
                                                ... on PurchasingCompany {
                                                        location {
                                                                id
                                                                catalogs(first: 10){
                                                                        edges{
                                                                                node{
                                                                                        id
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                }
                                        }
                                }
                        }
                }
        }

Returns the following error message:

{"errors":[{"message":"Internal error. Looks like something went wrong on our end.\nRequest ID: 12360f40-7cde-483a-b029-d39cbf2cb5b6 (include this in support requests).","extensions":{"code":"INTERNAL_SERVER_ERROR","requestId":"12360f40-7cde-483a-b029-d39cbf2cb5b6"}}]}

 

But works fine with the "catalogs" node removed

{
                orders(first: 10, query: \"processed_at:>=$processed_at_min processed_at:<$processed_at_max\") {
                        edges {
                                node {
                                        id
                                        purchasingEntity {
                                                ... on PurchasingCompany {
                                                        location {
                                                                id
                                                        }
                                                }
                                        }
                                }
                        }
                }
        }

 

Bad code on my part or did I find a bug?

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 525

Hi @mwex501 👋

 

Thanks for sharing the request ID! The logs suggest that the app may not have permissions to view `CompanyLocationCatalog`. Would you please try adding `read_publications` or `read_channels` then re-test the query?

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