Return of enum values

Options

How do I return enum values in a variable as part of a GET api? The enum values will be used in a drop down as part of updating data from the GET api.

Or do I get the enum values in another way for my front end?

Best Answer

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi,

    usually when you have enum values that are rather constant like categories of products for example it's better to have them saved on the fronted side and not use API calls to get them, unless they constatly change and you need to provide them dynamically

  • sOliverV
    sOliverV Member
    Options

    The question is how to get them to the frontend? Is it possible? What is the idea with enums in Xano if you can't use them. To use them only locally in Xano must be a rare special case? (And it is not best practise to spread maintenance of master data in applications).

  • sOliverV
    sOliverV Member
    Options

    Ok. That means that there is no way to include the enums, as they are defined in a table, to any API. It would be nice if that fact was stated in documentation. Felt like a fool searching for a solution.