You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Graphql-shield does not seem to work with graphql-yoga and graphql-modules. I don't know where the issue is. I've reduced the implementation to a short version. Basically there are two query fields. One is protected by a graphql-shield rule and one is not. The one protected by the rule is not returning expected error response to the client. Please check it out.
Go to this github repo
Fork/download the project.
Run pnpm install(or npm if you prefer to).
Go to url http://0.0.0.0/graphiql.
Try making both query1 and query2 and match the responses as written in the resolver code. query2 is protected by graphql-shield rule so it should return an error. But it doesn't.
Expected behavior
I expected to get an errors array with the custom error I defined in graphql-shield rule as the result. But I get something else back as the error.
Screenshots or Videos
No response
Platform
OS: [Fedora Linux]
NodeJS: [18.4.0]
@graphql-yoga/* version(s): [e.g. 2.9.2]
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Graphql-shield does not seem to work with graphql-yoga and graphql-modules. I don't know where the issue is. I've reduced the implementation to a short version. Basically there are two query fields. One is protected by a graphql-shield rule and one is not. The one protected by the rule is not returning expected error response to the client. Please check it out.
Your Example Website or App
https://github.com/xoldyckk/yoga_shield_modules_error
Steps to Reproduce the Bug or Issue
Go to this github repo
Fork/download the project.
Run pnpm install(or npm if you prefer to).
Go to url http://0.0.0.0/graphiql.
Try making both query1 and query2 and match the responses as written in the resolver code. query2 is protected by graphql-shield rule so it should return an error. But it doesn't.
Expected behavior
I expected to get an errors array with the custom error I defined in graphql-shield rule as the result. But I get something else back as the error.
Screenshots or Videos
No response
Platform
@graphql-yoga/*
version(s): [e.g. 2.9.2]Additional context
No response
The text was updated successfully, but these errors were encountered: