Trying to get fulfillmentStatus and financialStatus from Orders object but get error.

benjibutton
New Member
2 0 1

Let me start off by saying I'm new to the storefront API and graphql. I'm trying to create an order history table in a customer's account profile on my dev site. I have a query that fetches customer data with an access token (as seen below). When I add `fulfillmentStatus` and `financialStatus` to the query in the orders object, it returns a couple of errors: `"Field 'financialStatus' doesn't exist on type 'Order'"` and `"Field 'fulfillmentStatus' doesn't exist on type 'Order'"`. The documentation says that the Order object has those two fields. What am I doing wrong? Any help would be greatly appreciated.

const customerQuery = gql`
    query customerQuery($token: String!) {
        customer(customerAccessToken: $token) {
            firstName
            lastName
            phone
            phone
            displayName
            defaultAddress {
                address1
                address2
                city
                province
                country
            }
            orders(first: 100) {
                edges {
                    node {
                        id
                        name
                        customerUrl
                        orderNumber
                        processedAt
                        subtotalPrice
                        fulfillmentStatus
                        financialStatus
                    }
                }
            }
        }
    }
`;

 

RemiLPE
New Member
2 0 1

Hello, I am having the same problem!
Did you find a solution ?

Thanks !

Kevin_A
Shopify Staff
Shopify Staff
306 39 50

Hey @benjibutton 

I just tried this using version 2020-07 and didn't have any issues. Can you get me the x-request-id response header so I can take a look at our logs? 

Kevin_A | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

benjibutton
New Member
2 0 1

Hey @Kevin_A 

The x-request-id is below. Feel free to let me know if there is anything I am doing wrong.

8f0a3773-bb85-46c2-8632-92091ae2e7ba

 

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
306 39 50

Hey @benjibutton 

Looks like you are not specifying an API version so it is serving you 2019-10, and in 2019-10 it doesn't look like these fields existed. You can find more information on specifying a newer API version here

Kevin_A | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes