I figured it out it seems. Not sure what did the t...
# prisma-whats-new
s
I figured it out it seems. Not sure what did the trick, but it works now!
n
@sebastien hey it looks like you are using callbacks that don't work reliably currently. You need to wrap them using
new Promise
as mentioned here: https://www.graph.cool/docs/reference/functions/request-pipeline/overview-pa6guruhaf/#current-limitations
it's important to use
resolve
and
reject
instead of
return
from within the callback
s
Ahh, I see! Thanks so much @nilan. This applies to both server-side subscription and request pipeline functions?
n
Yes 🙂
Ah I should put that limtation to the general functions chapter instead, good point
s
Perfect, I’ll work on fixing these functions tomorrow. I thought I was almost done with this, but now I realized that a lot of my customers like to pay through Paypal, so I’ll have to also implement a payment option for Paypal. I’m hoping that the Paypal API is as easy to understand as the Stripe one.
n
Ah gotcha! I never used it myself but would love to help you out with that and eventually create a new example here: https://github.com/graphcool-examples/functions
s
That sounds great! If you want, I can work on it and then let you know so that you can review what I have.
n
Absolutely! Would love to collaborate 👍
s
Awesome, thanks so much! 😃
❤️ 1