feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.07k stars 752 forks source link

After v33 -> v34: Can not create query syntax schema for property 'tags' #2980

Closed tvld closed 1 year ago

tvld commented 1 year ago

I upgraded from v33 to v34 this morning. But running npm run dev gives now: Error: Can not create query syntax schema for property 'tags'. Only types string, number, integer, boolean, null are allowed.

This worked ok in v33 In my schema:

 tags: Type.Optional(Type.Array(Type.String())),

I tried but this did not help:

export const myQuerySchema = Type.Intersect(
  [
    querySyntax(myQueryProperties, {
      tags: {
        $in: Type.Array(Type.String())
      }
    })
  ]
)
daffl commented 1 year ago

Sorry about that, this error has been fixed in 5.0.0-pre.35 that I just published. One thing worth noting that $in will only work with array values in MongoDB.

tvld commented 1 year ago

Geat, can confirm fixed in v35