Strapi:GraphQL突变无身份验证
我为基于Strapi的简单电子购物商进行编程。我需要在没有任何JWT代币的情况下向公众打开自定义的“订单”突变,但我不知道如何。可以在Strapi中这样做吗?谢谢。
I program simple e-shop based on Strapi. I need to open my custom "order" mutation to public without any JWT token but I can't figure out how. Is it possible to do that in Strapi? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在Strapi V4中,您可以这样做:
在您的情况下,它是“创建”。
In Strapi v4 you can do it like this:
In your case it is "create".
看看 https://docs.strapi。 io/developer-docs/最终/插件/graphql.html#扩展-the-schema :
resolversConfig具有称为
auth
的属性,该属性如下:请求
所有
Look at https://docs.strapi.io/developer-docs/latest/plugins/graphql.html#extending-the-schema:
resolversConfig has a property called
auth
which is like:So for example you need to specify your mutation name:
Otherwise just override your resolver