Feathers-vuex: mapGetters Find params query with nested object

Created on 21 Jul 2020  路  2Comments  路  Source: feathersjs-ecosystem/feathers-vuex

Server is returning nested/ relationship object as below. But, its not visible in the UI. How can we query it from store.

FindTickets (mapGetters) returning tickets with nested associated users

id: 23,
user: {
email: (...)
id: (...)
property: "vto"
}

Trying to filter tickets by users belonging to property in the UI. Correct results are returned by Feathers but not able to filter it in the UI.

params.query

$limit: 10
$skip: 0
$sort: {createdAt: -1}
user: {
   property: "vto"
}

Most helpful comment

FeathersVuex use the sift/mongo syntax for querying so you can use the dot syntax like that:

{
  query: {
    $limit: 10,
    $skip: 0,
    $sort: { createdAt: -1 },
    "user.some.prop": "value",
  }
}

All 2 comments

FeathersVuex use the sift/mongo syntax for querying so you can use the dot syntax like that:

{
  query: {
    $limit: 10,
    $skip: 0,
    $sort: { createdAt: -1 },
    "user.some.prop": "value",
  }
}

Thank you @J3m5. This helped filter data.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DreaMinder picture DreaMinder  路  6Comments

ontoneio picture ontoneio  路  7Comments

juancampuzano picture juancampuzano  路  4Comments

kaizenseed picture kaizenseed  路  7Comments

coderinblack08 picture coderinblack08  路  7Comments