graphql-compose-mongoose icon indicating copy to clipboard operation
graphql-compose-mongoose copied to clipboard

addRelation function do not support nested paths

Open grinsteindavid opened this issue 1 year ago • 0 comments

I am experiencing a limitation with the addRelation function when working with nested fields in my schema. Specifically, addRelation does not seem to support fields that are deeply nested using dot notation, such as remote.budgets.notifyTo.

The only way I have found to work around this limitation is to replace the dots with underscores, resulting in a field like remote_budgets_notifyTo{_id firstName}. However, this workaround is not ideal as it deviates from the more intuitive and standard nested structure.

I would prefer to use the following nested structure:

remote { budgets { notifyTo { _id firstName } } }

Is there any plan to support this feature in future releases? It would greatly improve the flexibility and readability of the schemas.

Thank you!

grinsteindavid avatar Aug 29 '24 17:08 grinsteindavid