Is it just me or would anyone else like to be able...
# prisma-whats-new
s
Is it just me or would anyone else like to be able to write functions that respond to an HTTP endpoint? Vote on this comment.
👍 1
a
@socialgraph You mean creating new endpoints directly in the console?
n
@socialgraph I am not sure what you mean, can you describe a use case?
a
There's a workaround that allows you to do it. Create a new Type with a single JSON field. Use the Simple API to HTTP Post your json payload to that Type, and create a SSS or create hook to put your logic in.
👍 1
s
Creating new endpoints directly in the console is exactly what I was meaning. Just a simple function that's not associated with any data.
I wanted to use it to generate TwiML for my Twilio phone flow.
It's not at all related to GraphQL, but your interface is so much nicer than AWS Lambda. (which is what I ended up using)
a
As long as you have just enough control over the calling side to make sure the data is valid JSON, you can use my workaround. Otherwise, webtask.io is a great and free alternative, because it's the same system Graphcool uses under the hood. Even the UI should be somewhat familiar over there.