stackwise icon indicating copy to clipboard operation
stackwise copied to clipboard

Callback function inside `in` won't trigger Stackwise.

Open Blankeos opened this issue 1 year ago • 1 comments

Ran into a minor bug (or not), while working on: https://github.com/stackwiseai/stackwise/pull/28. Basically, passing a callback function inside in. Do let me know if this should be supported by Stackwise or not. I tested this without the callback and the extension ran just fine.

To reproduce:

  1. Have a stack that has a callback as an in e.g.
// index.test.ts
  
const channel_name = "schema-db-changes";
  const callback_function = (payload) => {
    console.log("Database has changed!:", payload);
  };

 stack("Listen to database changes using supabase", {
    in: {
      channel_name: channel_name,
      callback: callback_function,
    },
    out: {
      channel: "",
    },
  });

  1. Save as usual

  2. Expect Bug: It won't run.

Blankeos avatar Dec 03 '23 18:12 Blankeos

Thanks, on it

waynehamadi avatar Dec 04 '23 14:12 waynehamadi