Reputation: 1
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.
Upvotes: 0
Views: 648
Reputation: 5746
Look at https://docs.strapi.io/developer-docs/latest/plugins/graphql.html#extending-the-schema:
resolversConfig has a property called auth
which is like:
auth: false to fully bypass the authorization system and allow all requests
So for example you need to specify your mutation name:
resolversConfig: {
'Mutation.updateAddress': {
auth: false,
},
},
Otherwise just override your resolver
Upvotes: 0
Reputation: 86
In Strapi v4 you can do it like this:
In your case it is "create".
Upvotes: 1