GraphQL Union and input type?

Is it possible in GraphQL to have an input type that is also a union?

Sort of:

const DynamicInputValueType = new GraphQLUnionType({ name: 'DynamicInputType', types: [GraphQLString, GraphQLFloat, GraphQLInt] }) 

but can also be used as an input for a mutation?

+17
source share
2 answers

As of September 2017, this is not possible. discussion of this function continues .

+13
source

There is an npm module. I have not tested. https://www.npmjs.com/package/graphql-union-input-type

+1
source

Source: https://habr.com/ru/post/1270168/


All Articles