Custom types and arrays not supported in action handlers #7256
-
I am new to action handlers and can not see a way to return a custom type or an array of a type. In a query, the output type below returns
I have found it also isn't possible return custom types, for example the below passes the UI checks in the console but fails when it tries to apply it to the action.
I'm assuming there is a way around this but I can't see it in the docs or on any tutorials. I do use relationships for some parts of my handlers, however there are more times where I want to return custom data to protect the data in the database, or transform it using business logic. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@charklewis You can return an array of types.
The other limitations around returning a "nested" array or object is on the roadmap for this quarter and should be lifted in a release this month or early Sep! |
Beta Was this translation helpful? Give feedback.
@charklewis You can return an array of types.
For example the following action definition works:
The other limitations around returning a "nested" array or object is on the roadmap for this quarter and should be lifted in a release this month or early Sep!