Replies: 11 comments 7 replies
-
Are we going to see golang support for functions? |
Beta Was this translation helpful? Give feedback.
-
@Meldiron, how does this work for Appwrite considering data is sent as a string? What if the developer doesn't want to pass a JSON string? |
Beta Was this translation helpful? Give feedback.
-
I think it might be worth mentioning some variables like |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to add option to upload prebuilt binaries instead of code? So basically something that was possible in versions prior to 0.13. Would also benefit you for Appwrite Cloud - I am using 4cores/8GB server and it is already struggling when I have to deploy 25 functions. Not sure if the questio 8000 n is out of scope but since you are refactoring functions maybe it is worth giving it a look. |
Beta Was this translation helpful? Give feedback.
-
@Meldiron Do you have a release date? |
Beta Was this translation helpful? Give feedback.
-
That's what we have now: {
"$id": "64165dbc616d0cxxxx95c",
"$createdAt": "2023-03-19T00:56:28.410+00:00",
"$updatedAt": "2023-03-19T00:56:43.844+00:00",
"$permissions": [],
"functionId": "functionId",
"trigger": "http",
"status": "completed",
"statusCode": 422,
"response": "{\"message\":\"My message.\"}",
"stdout": "",
"stderr": "",
"duration": 0.105232
} I wish it could look like this: {
"$id": "64165dbc616d0cxxxx95c",
"$createdAt": "2023-03-19T00:56:28.410+00:00",
"$updatedAt": "2023-03-19T00:56:43.844+00:00",
"$permissions": [],
"functionId": "functionId",
"trigger": "http",
"status": "completed",
"statusCode": 422,
"response": {"message": "My Message"}
"stdout": "",
"stderr": "",
"duration": 0.105232
} |
Beta Was this translation helpful? Give feedback.
-
Hi, I think customizing URLs is an urgent feature. When will it be released? |
Beta Was this translation helpful? Give feedback.
-
when can we get this feature as this is a basic need, as we need to get web requests outside appwrite like payment gateways, what can we do without that guys, should we launch a ecom App for free. |
Beta Was this translation helpful? Give feedback.
-
For anyone who needs to have URL access to your functions, you can try: Function Proxy - https://github.com/stnguyen90/appwrite-function-proxy Funcover Docker container will provide you with anything you need (including headers) to use your Appwrite function as an input webhook. |
Beta Was this translation helpful? Give feedback.
-
is this new generation can support implementing discord bot? |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone for your feedback, generation 4 of Appwrite Functions was released in Appwrite 1.4 🎉 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
helloWorld()
👋🎓 Background
Appwrite Functions let you extend Appwrite's backend capabilities with your own backend code written in your favourite language. Functions can help you with scheduled task such as cleanup, event-triggered tasks such as invoice generation, or http-triggered tasks to implement your own Appwrite "endpoints".
Functions are currently fast and powerful, but there are some downsides and limitations. To address them, we plan to introduce new generation of functions 🔥 This discussion describes our suggested changes. Keep in mind it's a discussion and nothing is set in stone.
💎 Backwards Compatibility
All existing functions will be backwards compatible, and you won't need to re-write function to a new generation.
All new functions made after upgrading Appwrite will need to be written in a new syntax.
🤖 Syntax Changes
Hello world
Current Generation:
New Generation:
In some languages you can even use Destructuring assignment, to only extract needed parts of
context
:Working with payload
Current Generation:
New Generation:
Variables
New Generation:
Logging
New Generation:
🔮 Future possibilities
New generation will introduce a custom URL for functions. For example, you could have URL
my-function.my-project.appwrite.myapp.com
. You can send request of any kind to this endpoint and your function will be triggered. This can be helpful when trying to use Appwrite without SDKs, or when using Appwrite function as webhook for payment gateway integration.When using this function URLs, some more options become possible.
Request headers
More request information
HTML response
File response
Redirect
Let us know what you think! 🔥
We are satisfied with our implementation but we believe transparency is a key to success. We are opening this discussion to public and would love to hear what you love and what you hate about the new generation. Let's chat 😇
Beta Was this translation helpful? Give feedback.
All reactions