GraphQL联合和输入类型? [英] GraphQL Union and Input Type?
本文介绍了GraphQL联合和输入类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在GraphQL中,输入类型是否也可以是并集?
Is it possible in GraphQL to have an input type that is also a union?
类似的东西:
const DynamicInputValueType = new GraphQLUnionType({
name: 'DynamicInputType',
types: [GraphQLString, GraphQLFloat, GraphQLInt]
})
还能用作突变的输入吗?
but also able to be used as a input for a mutation?
推荐答案
到2017年9月,这是不可能的.关于此功能的正在进行的讨论.
As of September 2017, this is not possible. There is an ongoing discussion around this functionality.
这篇关于GraphQL联合和输入类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文