Skip to content

🚀 Feature: Customize default function "example data" #5716

Closed

Description

@byawitz

🔖 Feature description

Add the option to set function default example data.

When executing a function from the console, there's the option show example JSON, I think it might my be nice to have this option to fetch some basic JSON the user added to the deployed function.

So for example the appwrite.json will look something like this.

{
  "projectId"  : "someProject",
  "projectName": "General",
  "functions"  : [
    {
      "$id"       : "646b67675406f6ae4388",
      "name"      : "My Awesome Function",
      "runtime"   : "node-16.0",
      "path"      : "functions/My Awesome Function",
      "entrypoint": "src/index.js",
      "ignore"    : [
        "node_modules",
        ".npm"
      ],
      "execute"   : [],
      "events"    : [],
      "example"   : {
        "userName": "John",
        "password": "world",
        "age"     : 26
      },
      "schedule"  : "",
      "timeout"   : 15
    }
  ]
}

Then, the console could load that example - if it exists - and let the user copy it.

image

🎤 Pitch

Many functions have some basic logic that can work many times.
This feature will allow fast debugging of a function.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. joeyouss commented on Jun 17, 2023

    @joeyouss

    Thank you for opening this, it would be cool to have this.

  2. self-assigned this
    on Jun 17, 2023
  3. added
    product / functions
    on Jun 17, 2023
  4. added
    enhancement
    and removed on Mar 20, 2024
  5. eldadfux commented on Feb 23, 2026

    @eldadfux
    Member

    Stale issue, closing down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementproduct / functions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions