Partner API makes pagination impossible?

Solved

Partner API makes pagination impossible?

davelink
Shopify Partner
2 1 1

Hi there,

 

I'm at a loss for how folks are handling pagination when building on top of the Partner API. I've included the excerpt from the API documentation. How am I supposed to make an `after` request when an endCursor isn't being provided to the PageInfo object in the GraphQL Partner API?

 

davelink_0-1706640268111.png

 

Thanks in advance for any wisdom here.

 

Accepted Solution (1)

davelink
Shopify Partner
2 1 1

This is an accepted solution.

Well, to answer my own question for folks who encounter this in the future...

 

You need to include `cursor` against the node you're querying for, as seen below. Then, you can use that cursor in your `after` statement. If anyone from the technical writing team at shopify sees this, I'd highly recommend you simply explain pagination inside the note that already exists for folks building on the Partners API.

 

edges {
    cursor
    node {

View solution in original post

Reply 1 (1)

davelink
Shopify Partner
2 1 1

This is an accepted solution.

Well, to answer my own question for folks who encounter this in the future...

 

You need to include `cursor` against the node you're querying for, as seen below. Then, you can use that cursor in your `after` statement. If anyone from the technical writing team at shopify sees this, I'd highly recommend you simply explain pagination inside the note that already exists for folks building on the Partners API.

 

edges {
    cursor
    node {