Customer Journey - Graphql API Issue

PrakashGabriel
Excursionist
21 1 0

Hi,

Currently we are facing an issue in fetch the data from the Graphql for Customer Journey only for certain customers. It was working fine before but now it return some error like 'Page not fount'. Attached below is the query that we used to get the graphql data.

The same below query will work if I limit it to first 70 order.  But it varies for all and for some it works if I limit it to 60 and so on.

X-Request-ID  -  298e4daf-3604-41ab-8a42-6ce5e0b8dbd0

Could anyone please help me with this?

Regards,

Heaven

 

 {orders(first: 80 query: "updated_at:>='2020-09-03 16:14:41 +0530'") {edges {node {customerJourney {daysToConversion customerOrderIndex moments {occurredAt ... on CustomerVisit {id landingPage landingPageHtml occurredAt referralCode referralInfoHtml referrerUrl source sourceDescription sourceType utmParameters {campaign content medium source term } } } } legacyResourceId customer {legacyResourceId } } cursor } pageInfo {hasNextPage } } }

 

 

 

0 Likes
Greg_Kujawa
Shopify Partner
965 80 204

Maybe try to use a bulk operation query (https://shopify.dev/tutorials/perform-bulk-operations-with-admin-api). See if it provides all the records you'd expect. Not that you'd necessarily need to switch your routine to this, but to determine if it's an inherent bug in the GraphQL query that's not being handled correctly on Shopify's end. Especially if the query worked before. Does changing the API version make any difference?

0 Likes
PrakashGabriel
Excursionist
21 1 0

Hi Greg,

We even tried changing the API version but nothing worked. Here are some additional failure info that we are receiving now. Let me know if it helps to solve it.

[{"message"=>"Internal error. Looks like something went wrong on our end.\nRequest ID: ceb30db8-8b94-47dd-adc7-396d08fae20c (include this in support requests).", "extensions"=>{"code"=>"INTERNAL_SERVER_ERROR", "requestId"=>"ceb30db8-8b94-47dd-adc7-396d08fae20c"}}]

 

 

 

0 Likes
Greg_Kujawa
Shopify Partner
965 80 204

The Shopify support staff can check out the request ID against logs on their end and perhaps shed some light. Anyone?

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
213 27 40

Hey @PrakashGabriel 

Took a look at the request IDs you provided, looks like we are seeing a timeout causing the internal server error. My guess is the shop you are querying on has a lot of orders, and I have a suspicion that this timeout is happening due to filtering on updated_at. Have you tried @Greg_Kujawa suggestion to use a bulk query? Outside of using a bulk query, the best workaround I can suggest is to limit the amount of orders you are retrieving at a time.

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
PrakashGabriel
Excursionist
21 1 0

Kevin,

Sorry for the delay. We use nodes to get the data but I believe nodes are not supported in bulk query.

0 Likes
Greg_Kujawa
Shopify Partner
965 80 204

The equivalent of nodes in the bulk query are the individual lines in the JSONL results file that's generated and downloaded. You should be able to get at what you need using bulk operations I'd imagine. At least give it a try!

0 Likes