'Something like union in input fields graphql

I use ariadne and I have entities that has value. Value can be string, int, boolean, another inputs or list of another inputs. Like that:

value: 1
value: "Hello World!"
value: true
value: {
    country: "UA"
    city: "Kyiv"
}
value: [{date: "22.01.2003", time:"11:14"}, {date: "24.05.2022", time: "00:41"}]

Can I use something like union types in graphql types but in inputs?

union ValueUnion = Int | String | ...
input EntityInput {
    value: ValueUnion
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source