Can I create multiple elements of the same type using Strapi and GraphQL?

南笙酒味 提交于 2021-02-11 12:23:08

问题


Can I create multiple elements of the same type using Strapi and GraphQL? For example -

createMultipleFoo mutation(data: [
    nameOfFoo: "ooaoaoa",
    weightOfFoo: "aododo"
    ], ....)

回答1:


It's in the roadmap.

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.

Any questions post a comment



来源:https://stackoverflow.com/questions/63260467/can-i-create-multiple-elements-of-the-same-type-using-strapi-and-graphql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!