-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
$id not converted to _id when querying ? #223
Comments
Thanks, I’ll try to create a test based on your case |
use this to install the fixed version until @comigor merges fix into
|
Thanks very much 💞 .Let me try 🙏 |
@RageshAntony any updates? |
Fixed in 6.13.1-beta.1 |
Yeah it's working . I was busy so I can't test it . Today I used latest beta and it's working . Thanks |
Bug description
I am querying MongoDB using a graphql backend via Artemis . The MongoDB having _id field as document id .
As per #116 , Artemis changing the variable name to $id from _id , to avoid Dart Naming rules conflicts
But now the problem is , when using queries with variables , Artemis
ClassArguments.toJson
producing $id only , not _idSo the GraphQL endpoint returning ,
"Variable \"$_id\" of required type \"MongoID!\" was not provided.
Why this happening ?
Specs
Artemis version: [6.12.3-beta.2]
build.yaml:
Artemis output:
GraphQL schema:
GraphQL query:
Flutter implementation Code
This is my code to run query . the
SeriesByIdArguments(..).toJson()
produces{$id: 5f660d7a929072166f5addb2}
instead of{_id: 5f660d7a929072166f5addb2}
Artemis Client
The same issue occurs When I used Artemis Client Helper class
I am getting error
"Variable \"$_id\" of required type \"MongoID!\" was not provided.
I checked the generated code, The implementation in generated class is only having $id for both fromJson and toJson
So I think there is some issue here . Please help .
Thanks in advance
The text was updated successfully, but these errors were encountered: