Ok finally found out it’s not a bug but a limitation : only 1kb of metafields ,query cost of 30 and max 3000bytes.
Well it’s seems pretty too much restrictions, so if a customer have many products in cart and you have a products metafields based function , the function will not just work
Just to clarify, it’s the query itself that can’t be more than 3000 bytes. The limitation you are likely hitting is the metafield value, which is currently limited to 1kB.
Hi Nick ! just saw your message really sorry for the delay.
I have a booking app, and i allow merchants to set special discounts on any dates of calendar they want to.. so the metafields can be really big since it need to store the dates, and usually merchants set-it for months ahead like :
2023/04/12 : $20
2023/04/16 : $30
etc..
so basically with theses limitations it’s impossible to achieve that using shopify functions
@SPEAZ Interesting case. Where are the customer’s selected dates being stored? Any ideas on what a more reasonable metafield value limit would be for your use case?
Well i cant say, cause it’s depend of merchants and number of items with metafields on cart etc so i dont think it’s usable for the case when you need to grab a lot of settings
Btw there is already a limitation of 5ms for the function, so why there is also a limitation cost since if it’s too heavy and slow there is already a limit ?
What about instead of limitations warn the merchant about the function can slow down the checkout process (if it’s too slow) ? i’m pretty sure 80% of merchant will prefer to use a slow function rather than dont have a possibility to use it !
Hi Nick ! Any updates concerning the limitations of input queries ? I just saw it’s now possible to use functions with javascript and i would love to use functions on my app
Thanks for the update. This is still much too restrictive for our use case as we store product bundle configurations within a metafield. With scripts we could do around 80 bundles, now we can do less than 10.