Closed Diogomartf closed 5 years ago
Can you add a debugger;
call in that page's component to see what is passed into pageContext
?
It looks like you're calling that template from somewhere that's not the pagination function, but I can't be sure. Is your code public?
Thanks for the quick reply. It's not public.
The query is on interviews-page.js
gatsby-node.js
The $skip
and $limit
are being correctly passed to the pageContext
. I'd guess maybe you're calling createPage()
somewhere else outside of the paginate()
call?
If you can get me access to the code I could have a look in more detail. Unfortunately from what you've posted I can't see anything that looks like it would cause this issue.
I'm not sure it's related, but I think it's good practice to have a name before every query like query InterviewsPage(...
. Don't know if that will change anything, but it's the only thing that I can see which seems out of place in your photos.
I think it's not the case because as v2 of Gatsby query names are no longer required . I'll give you access to the code if you don't mind looking at it.
I saw your invite, took me a second to find the add-pagination
branch. The problem is here at src/pages/entrevistas/index.md
the templateKey
means that you're loading that template without the pagination settings.
Hopefully that makes sense. If not, feel free to post again and I'll try to explain in more detail.
You've nailed it. That was the issue. Thanks a lot @chmac
I'm getting this error: Variable "$skip" of required type "Int!" was not provided. and same for $limit.
Everything is working fine except this. You can see the query bellow