I’m developing a Zapier integration against an underlying Graphql API using cursor based pagination.
What is the recommended way to build my triggers;
- Using polling, and implement some js code to “support” cursor based pagination - any links on how to do this?
- Using REST hooks. I looked at one of the Github repositories, and it seems like it’s not super active - are REST hooks preferred over polling or?
Thanks for helping me out :)
Best answer by ikbelkirasanView original
More info on how to use cursors in a trigger can be found here: https://platform.zapier.com/cli_docs/docs#paging
Thanks for the answer - I will stay with polling then. It makes sense that the polling query needs pagination. Regarding the documentation in the link above - I’m a bit confused as to why it mentions dropdowns? As that simply because the way of pagination is the same as for the polling trigger?
In your polling triggers you can make multiple requests to pull back more than one page of data if you need to, but you’re in control of that - the platform itself isn’t going to make paging requests when the Zap is running.
Let us know of that doesn’t make sense. There’s a good bit of overloading of context when we discuss triggers - Zap Editor execution vs Zap runtime execution; and trigger execution to populate a dropdown vs trigger execution to support a Zap runtime polling execution. So it’s natural for it to be a little unclear at first, unfortunately.
Thanks for your answer - I’m interested in Zap runtime polling execution 😅
I actually asked a more refined question here, where you can maybe help answer one of the things I currently don’t understand how to achieve speaking about runtime polling execution?