Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

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 {