-
Notifications
You must be signed in to change notification settings - Fork 67
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
Weird error when loading a dynamic property of a type #140
Comments
Hi, this is a pretty typical Swift error when you try to decode a type that doesn't have a required field. I'd double check that the data coming back from your database has the id field populated so it matches your codable model definitions. I might be able to give use some more direct guidance if you provide the GraphQL query that failed |
Hey, thanks for your answord. The query was the following one:
But the debugger with breakpoints never reached the dynamic load function. And when I don't require the groups, everything work fine Thanks, |
If everything worked okay when you didn't include |
I'm pretty sure, I already tried and never reach the group resolver. But I will try it again. |
Hey, I tested, it never reach the resolver of the subElement, I generated a small repo that it's a minimum reproducible error (I think) You can see it here: https://github.com/Dracks/GraphqlVaporSample Simply run the tests, there is 2 tests, one includes the call to the groups, the other doesn't, the first one fails the other works fine. |
Hello,
I'm trying to migrate my project MrScrooge from nestjs with graphql into swift with vapor, graphqlkit (which uses graphiti), And seems I've got some issue, not sure if it's my error or is an error on graphiti.
When I add a dynamic field into a type, to load only when I've got the request, I do it as following:
You can see this here:
Dracks/mr-scrooge@27862ab#diff-86900d9223aa878afd6fd2f942cdd076fa63c7a147fae5e22db15769e0d2ec95R63
and here:
Dracks/mr-scrooge@27862ab#diff-86900d9223aa878afd6fd2f942cdd076fa63c7a147fae5e22db15769e0d2ec95R136-R141
it ends crashing in some weird error, the error is the following:
The text was updated successfully, but these errors were encountered: