nestjs-query icon indicating copy to clipboard operation
nestjs-query copied to clipboard

Query on subdocuments (REST API)

Open yoedusvany opened this issue 3 years ago • 0 comments

Can't query subdocuments fields

I'm trying to query a document that it has subdocuments using nestjs-query only and a QueryService.

Here is the example `const filterQuery: Query<Example> = { filter: { user: { name: { eq: query.name } }, }, };

this.query(filterQuery)`

I'm getting this error: Error: unknown operator "userId"

The Example document look like this { _id: #####, user:{ _id: #####, name: 'Name',..... }, property1: '###', ..... }

It will be great if we can query subdocuments!

Thanks

yoedusvany avatar Dec 28 '21 21:12 yoedusvany