mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
ra-data-hasura: fix column sorting (#2276)
This commit is contained in:
parent
f9fc0cc5e3
commit
ec40706121
@ -63,7 +63,7 @@ export default (serverEndpoint, headers, config) => {
|
||||
finalSelectQuery.args.limit = params.pagination.perPage;
|
||||
finalSelectQuery.args.offset = (params.pagination.page * params.pagination.perPage) - params.pagination.perPage;
|
||||
finalSelectQuery.args.where = params.filter;
|
||||
finalSelectQuery.args.order_by = {column: primaryKey, type: params.sort.order.toLowerCase()};
|
||||
finalSelectQuery.args.order_by = {column: params.sort.field || primaryKey, type: params.sort.order.toLowerCase()};
|
||||
finalCountQuery.args.table = {'name': tableName, 'schema': schema};;
|
||||
finalCountQuery.args.where = {};
|
||||
finalCountQuery.args.where[primaryKey] = { '$ne': null };
|
||||
@ -147,7 +147,7 @@ export default (serverEndpoint, headers, config) => {
|
||||
finalManyQuery.args.limit = params.pagination.perPage;
|
||||
finalManyQuery.args.offset = (params.pagination.page * params.pagination.perPage) - params.pagination.perPage;
|
||||
finalManyQuery.args.where = { [params.target]: params.id };
|
||||
finalManyQuery.args.order_by = {column: primaryKey, type: params.sort.order.toLowerCase()};
|
||||
finalManyQuery.args.order_by = {column: params.sort.field || primaryKey, type: params.sort.order.toLowerCase()};
|
||||
finalManyCountQuery.args.table = {'name': tableName, 'schema': schema};;
|
||||
finalManyCountQuery.args.where = {};
|
||||
finalManyCountQuery.args.where[primaryKey] = { '$ne': null };
|
||||
|
Loading…
Reference in New Issue
Block a user