Empty

Highlighted
New Member
6 0 0

Has anyone got an idee why a simple graphql query isnt returning any fulfillment orders? The interface shows multipele unfulfilled fulfillments.

 

query GetOrder {
  order(id: "gid://shopify/Order/2520278991015") {
    fulfillmentOrders(first:20 ) {
      edges {
        node {
          id
        }
      }
    }
  }
}

 

I have to query from the order ID because this value is returned by an admin link. I need the fulfillmentOrder to eventually get the 

FulfillmentOrderAssignedLocation .

Any help or ideas? 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 129

Hey @brunogoossens,

This usually has to do with a missing permission. Fulfillment orders have 3 separate API scopes, depending on how your app operates.

read_assigned_fulfillment_orderswrite_assigned_fulfillment_orders

read_merchant_managed_fulfillment_orderswrite_merchant_managed_fulfillment_orders

read_third_party_fulfillment_orderswrite_third_party_fulfillment_orders

Documentation here has the full details.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
6 0 0

OMFG.

Seems like the Shopify GraphiQL App does not have all the scopes. Super hard for debugging! Especially when no error occurs when asking for the fulfillmentOrders without all the scopes.

With my custom app, I was able to get it to work.

Thx!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 129

Hey @brunogoossens,

Glad to hear you were able to get it working. The Shopify GraphiQL app actually prompts for scopes during installation of the app, if the app on your store doesn't have the correct permissions you can delete and re-install it to add additional scopes.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes