Hello there.
I set a global middleware but when the request is send to the /graphql endpoint the request comes as a readable stream and the issue here is that:
- If you try to access it you will consume it and after that strapi will throw an error that the request is not a readable stream
- You cannot clone the readable stream
Is there any way for graphql to set a global middleware?
If i do for example
‘Mutation.createProduct’: {
middlewares: [‘global::audit’],
},
this is fine but I want it to be global for every mutation it would have been nice if I could say:
‘Mutation’: {
middlewares: [‘global::audit’],
},
and this to be available for all the mutations
This topic has been created from a Discord post (1235525031468204043) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord