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.

articles GraphQL query is returning empty response having hasNextPage set to true

articles GraphQL query is returning empty response having hasNextPage set to true

alokwizzy
Shopify Partner
1 0 0

We're using articles GraphQL Query to fetch articles of the store. Attached is the cURL request and response payload. The API responds with 200 status code with empty articles array as well as true in hasNextPage field and null endCursor 

 

Although the Rest API to fetch articles by blog is working as expected.

 

But our business need is to fetch articles by graphQL as it provides to fetch all articles instead of fetching by blog id.

 

We're having the same functionality in multiple stores and it seems to be working fine. 

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 239 533

Hi alokwizzy,

 

Thanks for your post. When testing on a couple test stores where one had blog articles and one did not the issue described with pageInfo values didn't occur. So if you're able to consistently have it happen on that one store please [request email assistance from Partner Support] using the 'App Development and API' topic to enable a more direct investigation.

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

davem2
Shopify Partner
6 0 5

This is happening for us too. In our case it is because of a deleted customer account with the same email as an active account. If you include "first:1" in the query, the edges and nodes are empty arrays, hasNextPage is true, but endCursor is null.