Re: issue with Orders bulkOperationRunQuery

Solved

issue with Orders bulkOperationRunQuery

AbdoNabil
Tourist
3 0 12

I was running the following query to get Orders with agreements and sales

mutation {
  bulkOperationRunQuery(
    query:"""
           {
                orders(query: "(created_at:>=2023-08-23 AND created_at:<2023-08-24) OR (updated_at:>=2023-08-23 AND updated_at:<2023-08-24)", reverse: true) {
                    edges {
                        node {
                            id
                            agreements {
                                edges {
                                    node {
                                        id
                                        happenedAt
                                        sales {
                                            edges {
                                                node {
                                                    actionType
                                                    lineType
                                                    totalAmount {
                                                        shopMoney {
                                                            amount
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
           }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

this query was working fine two days ago but now it throw the following error message :

"userErrors": [
                {
                    "field": [
                        "query"
                    ],
                    "message": "The parent 'node' field for a nested connection must return a type that implements the 'Node' interface. Invalid connections: agreements."
                }
            ]

and i have no idea what changed in agreements to could have caused such an issue

Accepted Solution (1)
ShopifyDevSup
Shopify Staff
1453 238 497

This is an accepted solution.

Hi all, 

 

Our developers shipped a fix yesterday and I'm glad to hear that the bulk queries are working again for you @aravinda.

 

Just wanted to thank everyone who provided feedback here, or with partner support, to help us assess the situation and come to a solution.

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

View solution in original post

Replies 18 (18)

aravinda
Shopify Partner
3 0 7

Hi,

 

We are also facing the same issue from yesterday. It seems the problem is with the "sales" connection. If we remove the sales from the query and make the request, it works.

But we need the sales data.

AbdoNabil
Tourist
3 0 12

Yes, it seems that the "sales" connection is causing the problem , but like you we also need the sales data , please if you find any solution post it , and i will do the same if i found a work around

ShopifyDevSup
Shopify Staff
1453 238 497

Hello all,

 

Thank you for bringing this to our attention. To elaborate on that error message, the Order.agreements connection resolves to a SalesAgreement interface, which does not implement Node on any of the types.

 

There were recent updates with how bulk queries are validated, and our developers are reviewing these reports to determine the best path forward. In the meantime, if anyone can share more details about their specific use cases that relied on these connections, please share that context here to help us better understand the impact and assist in finding potential solutions.

 

Thanks for your understanding and cooperation.

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

AbdoNabil
Tourist
3 0 12

I opened a ticket with id 41124253 on Shopify Partner Support, containing more details on the issue and it`s use case , also can you provide us with an alternative query to retrieve the same data , while you are fixing the issue

jason_dev
Tourist
3 0 9

Suppose if you want to sum taxes paid for a given day using sale agreements.happenedAt then using this BulkQuery makes it a lot easier and faster.  It used to work well before. It is documented in your portal also. https://shopify.dev/docs/api/admin-graphql/2023-07/queries/order#examples-Get_sales_agreements_for_a...

vasyaa
Shopify Partner
2 0 7

Ticket 41172794 has our query attached. We need to retrieve sales amounts and associated tax data to provide our service. As of August 25th our integration is completely broken

 


To elaborate on that error message, the Order.agreements connection resolves to a SalesAgreement interface, which does not implement Node on any of the types.


I suppose it means that it does not implement Node since August 25th, before it should've implemented it since not only it didn't produce any errors but it also allowed to retrieve the data. I believe this to be a breaking change and it should be released with the new API version only

AgencyAnalytics
Shopify Partner
2 0 6

Can confirm it was originally working fine and did implement a Node interface because our queries pulled the nodes just fine and we rely on those nodes for data. Shopify does not provide accurate order details without those sales. They are necessary for accurate reporting and have broken our app with this failing on the API.

 

GregThoen
Shopify Partner
4 0 11

I am in the same boat as others.  We use this in order to get detailed information like taxes, shipping, refunds, etc., on the date those things actually occurred (which is not just the creation date of the order, so it does not work to just get the totals from the order or its line items) -- otherwise, it does not match Shopify's UI reports, which causes issues because then our customers do not see the same total numbers as they see in Shopify.

 

We are currently dead in the water with this.

 

Thanks,

Greg

8data_dev
Shopify Partner
3 0 2

the Node interface just requires an id field which the SalesAgreement does implement, why does it break then?

hexelon
Shopify Partner
1 0 2

The same query works with non bulk api, the change which broke this query causes inconsistency between the regular api where it works and is documented inside the gql api documentation. Please revert the change or change the documentation and move it to the unstable version only.

FTC84
Shopify Partner
1 0 2

We are experiencing the same issue; we have submitted ticket 41190322.  If it helps, we need sales data at the agreements level in order to report how our promotional campaigns for specific items have performed. 

ShopifyDevSup
Shopify Staff
1453 238 497

This is an accepted solution.

Hi all, 

 

Our developers shipped a fix yesterday and I'm glad to hear that the bulk queries are working again for you @aravinda.

 

Just wanted to thank everyone who provided feedback here, or with partner support, to help us assess the situation and come to a solution.

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

jason_dev
Tourist
3 0 9

I tried other API versions also but it is not working. Hopefully Shopify dev team will fix it.

Funnel
Shopify Partner
28 0 15

We are experiencing the same thing as well!

AgencyAnalytics
Shopify Partner
2 0 6

We are also having the same issue as of this past weekend.

vasyaa
Shopify Partner
2 0 7

Experiencing this since Aug 25, 2023 18:06:43 UTC. In our case it's not a mutation though. Nothing was changed on our side

aravinda
Shopify Partner
3 0 7

Wanted to inform here.... I just received a response from Shopify support that they have resolve the issue. It seems to be working fine for me.

 

Thanks!

jason_dev
Tourist
3 0 9

Awesome news. Its so nice of you to provide the information here.🙂