Open khanhthanhdev opened 2 years ago
You need to give all the required permissions to your CMS token. It fixed the issue for me. Go to settings > Permanent Auth Tokens and then edit the token you are using and then give the permissions. Hope it helps.
'''error - ClientError: Mutation failed due to permission errors: {"response":{"errors":[{"message":"Mutation failed due to permission errors","extensions":{"code":"403","failedActions":[{"action":"create","model":"Comment","stage":"DRAFT"},{"action":"update","model":"Post","stage":"DRAFT"}]}}],"data":null,"extensions":{"requestId":"cl87cg1f45rwc0ezs00jhmkep"},"status":403,"headers":{}},"request":{"query":"\n mutation CreateComment($name: String!, $email: String!, $comment: String!, $slug: String!) {\n createComment(data: {name: $name, email: $email, comment: $comment, post: {connect: {slug: $slug}}}) { id }\n }\n ","variables":{"name":"Trần Khánh Thành","email":"thanhkt27507@gmail.com","comment":"test comment","slug":"twg-la-gi"}}} at D:\test-blog\project_graphql_blog\node_modules\graphql-request\dist\index.js:254:31 at step (D:\test-blog\project_graphql_blog\node_modules\graphql-request\dist\index.js:63:23) at Object.next (D:\test-blog\project_graphql_blog\node_modules\graphql-request\dist\index.js:44:53) at fulfilled (D:\test-blog\project_graphql_blog\node_modules\graphql-request\dist\index.js:35:58)'''
I clone project and follow the video at 2:47:00 . How to fix this error. I'm trying to fix this bug