I need to validate a form-key / CSRF Token for a graphql mutation. Is there any way in Magento 2 to validate form-key or CSRF token for graphQl mutation.
We know default Magento2 controller already have the fork-key validation functionality but I need to validate it for GraphQl mutation . Our site has Re-act front-end and we are using GraphQL for data management from back end. We need to implement CSRF protection into our React-js front-end. That is why I need to validate the fork-key in graphQl mutation.
Please suggests.
Thanks.