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屋!
查看全文