grapher
grapher copied to clipboard
Query $options order in relations different from client to server
Hi,
I use grapher react HOC. If I query from react, the order is correct.
export default withQuery
(
( props ) =>
{
return query.clone( { _id : props._id } );
}
,{
reactive : true
,single : true
, loadingComponent: Spin
}
)( UI );
The query
export default createQuery
(
{
building :
{
// Dynamic filter
$filter( { filters, options, params } )
{
if( params._id ) filters._id = params._id;
}
,flats :
{
// options
$options:
{
sort: { date : 1 }
},
date :1
}
}
But if I use the same query serverside, the order goes wrong. Any clue ?
const building = query.clone( { _id } ).fetchOne();
const flats = expertise.flats;
console.log(flats);
I'm seeing this same issue too