Gadget syncing
So I run my own daily sync, and I've just noticed when Gadget makes the GraphQL calls to Shopify, its only using a page limit of 10? Why is this so low when you can request up to 250? Surely this would increase request time as its using a smaller page limit?

15 Replies
The internal sync logic doesn't affect your request time. The only thing that affects your request time is the amount of time that your actions run.
I will however speak to the team to see if we should up the limit
Okay so just to confirm, I use the following code and run it daily (as I've turned off product and inventory item webhooks)
So however long it takes to sync all of those models, it won't cost me request time?
It will cost you request time but not because of the Gadget sync logic
That would be outrageous
How is that request time calculated then?
The time that your action starts to run to the time that it ends
So basically just the time it takes to 'init' that sync then?
No
Each action that runs
If there are 2000 product updates, you'll be charged for 2000 action runtimes
Any time your code runs you're charged usage
Right so the time Gadget spends querying Shopify to get the products - I don't pay for this
If Gadget retrieves 500 products - I pay for the 500 update actions?
Did I get that right?
Yes
If our implementation is slow, that's our fault, not yours
Okay great thanks!
Would be interesting to know why Gadget only opted for a page size of 10!
I'm waiting on a response from my team member
Ok cool!
The reason is for optimization of tokens used so that we can go to the fastest rate limit possible. Based on this line in the rate limiting cost calc docs: https://shopify.dev/docs/api/usage/rate-limits#cost-calculation

Good to know, thanks for the info!
No problem