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
1440 235 489

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