Skip to content

[MongoDB]: Unable to retrieve id property value for inner nodes #61

@srieeni

Description

@srieeni

Hi Team,

Thank you so much for this wonderful library and maintaining it with good documentation.

I am following github mongodb-hotchocolate examples and able to spinup a graphql server and its working well serving required data with projections.

One issue that we are seeing is, it returns null value for id field on inner nodes.

Example:

{
"id": "Root123",
"field1" : "value",
"address": {
"id": "123"
"city":"Boston"
}
}

query T {
orders {
id
address {
id
city
}
}

Above query is returning us below output:

{
"orders": {

   "id": "Root123",
   "address": {
      "id": null                        ========> this id field is cocming as NULL
      "city":"Boston"
    }
}

}

Is this default behavior for hotcolate-mongodb resolvers? How can we override this behavior and fix this issue?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions