-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to parse @authorization rules in GraphQL Schema (Invalid argument: validate, error: String cannot represent a non string value) #5681
Comments
We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @mzvdev! 🙏 We will now prioritise the bug and address it appropriately. |
Hey @mzvdev, I've been investigating this one and generally looking into the issues with the The issue here is actually in your type definitions! In your JWT you have defined This is a bit of a shortcoming of the authorization features because the |
@darrellwarde Oups, Sorry! Thank you for finding. Indeed a type mistake from our side in the repo.
Will try to reproduce it again in my isolated repo and share it with you. |
@darrellwarde Quick question: is it possible to somehow identify which line cause an error? I have this error, but I have many places where I use { where: { node: {...} }, tried to isolate one by one, but not able to find it. |
hi @darrellwarde @mzvdev ,
|
@to-kn I confirm If I remove all @customResolver from my project, the GraphQLError is gone. Thank you! Trying to make a new issue repo with @customResolver |
@mzvdev i solved the issue in the meantime for us - we have a intermediate library to generate the schema.graphql from typedefs.graphql - there i had minor differences in the versions of neo4j/graphql and @graphql-tools. I brought both to the same (latest) version and now it is working in my case... |
@to-kn Thank you for sharing your experience! Which intermediate library it's ? For now I just connect the Neo4J GraphQL schema to Apollo. |
Hey @to-kn, can you try updating the library to 5.9.1 and try this again? I'm fairly sure I have this fixed for your particular case! |
And @mzvdev, if your issues are all related to |
@darrellwarde On our side, it works correctly now! Thank you 🙏 |
@darrellwarde I just tested to downgrade to our previous version and doing a clean install without the yarn lockfile, it now compiling also 🤷♂️ |
Okay great, I'm glad to hear things are working! I'll close this issue off, but please reopen if any issues persist. |
Hi @darrellwarde yes indeed the upgrade to 5.9.1 was the solution! |
Describe the bug
We found that when we delete the yarn lock file in our current project, we had an error parsing the GraphQL Schema.
It fails to parse @authorization rules (error message:
Invalid argument: validate, error: String cannot represent a non string value
)By removing @authorization rules it worked.
Then we tried to isolate the problem in a separate repo, we still had the same issue.
Details
Run tests by executing following commands:
Test should now fail with:
Now if you remove following @authorization in schema.graphql:
Tests will now pass...
To Reproduce
Steps to reproduce the behavior:
./test.sh watch-test
Expected behavior
No errors parsing the schema
Environment
The text was updated successfully, but these errors were encountered: