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.

GraphiQL app not allowing return queries??

GraphiQL app not allowing return queries??

zirekangel
Visitor
1 0 1

I need to pull return label information from a batch of orders under a certain tag and I have the following graphiql Code written:

 

query
{orders(first:100, query:"-node.tags[0]:Program Office 2023")
	{ 
		edges {
        node {
          id
          currencyCode
          customerLocale
          email
          phone
          processedAt
          shippingAddress {
            address1
            address2
            city
            company
            country
            countryCode
            firstName
            formatted
            formattedArea
            lastName
            name
            phone
            province
            provinceCode
            zip
          }
       fulfillments {
          trackingInfo {
            company
            number
            url
          }
        status
      }
          returns{
            edges{
              node{
                reverseFulfillmentOrders {
                  edges {
                    node {
                      id
                    }
                  }
                }
                
              }
            }
          
    
        }
          
        
          }
        }
}
}

and I keep getting this response:  "code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes"

 

I re-installed the GraphiQL app and gave it all the permissions when I noticed the returns permissions are missing.  Is there a way to give me access to the returns data?  I know the admin API grants access to it why doesn't the GraphiQL app??

 

Thanks for your help

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 524

Hey @zirekangel - thanks for bringing this up, really appreciated since this is odd. A colleague and I tested this on our own GraphiQL apps in our respective test stores and noticed that on installation the GraphiQL app doesn't offer the read_returns/write_returns scopes as selection choices. We used this query within GraphiQL to confirm that it wasn't included upon installation either:

{
 currentAppInstallation {
   accessScopes {
     access_scope: handle
     description
   }
 }
}

I'm going to reach out to our developers to see if this exclusion was intentional, but I can't guarantee a timeline on the response for this. Definitely odd that the scope isn't included despite being an available access scope in our docs. Hope this helps - keep an eye out for a response from either me or a colleague soon. 

 

Al | Shopify Developer Support

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