我可以使用 Strapi 和 GraphQL 创建多个相同类型的元素吗? [英] Can I create multiple elements of the same type using Strapi and GraphQL?
本文介绍了我可以使用 Strapi 和 GraphQL 创建多个相同类型的元素吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以使用 Strapi 和 GraphQL 创建多个相同类型的元素吗?例如 -
Can I create multiple elements of the same type using Strapi and GraphQL? For example -
createMultipleFoo mutation(data: [
nameOfFoo: "ooaoaoa",
weightOfFoo: "aododo"
], ....)
推荐答案
在 路线图.
您现在可以做的是创建一个自定义端点,即.创建多".发送一个 json 数组,并使用常规"为每个创建.查看此处的讨论.
What you can do for now is create a custom endpoint ie. "createMulti". Send a json array, and use the "regular" create for each. Check out the discussion here.
有任何问题发表评论
这篇关于我可以使用 Strapi 和 GraphQL 创建多个相同类型的元素吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文