mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
ra-data-hasura patch for get_many_reference (#1419)
* fix get_many_reference definition * update package version * update changelog and github url
This commit is contained in:
parent
2022091391
commit
964645cbb1
7
community/tools/ra-data-hasura/CHANGELOG.md
Normal file
7
community/tools/ra-data-hasura/CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
||||
## 0.0.2 (January 20, 2019)
|
||||
|
||||
### Bug Fix: GET_MANY_REFERENCE definition
|
||||
|
||||
## 0.0.1 (January 19, 2019)
|
||||
|
||||
### Add support for hasura data provider
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ra-data-hasura",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "react-admin data provider for Hasura GraphQL Engine",
|
||||
"main": "lib/ra-data-hasura.min.js",
|
||||
"scripts": {
|
||||
@ -24,7 +24,7 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/hasura/graphql-engine/issues"
|
||||
},
|
||||
"homepage": "https://github.com/hasura/graphql-engine",
|
||||
"homepage": "https://github.com/hasura/graphql-engine/tree/master/community/tools/ra-data-hasura",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0-beta.51",
|
||||
"@babel/core": "^7.0.0-beta.51",
|
||||
|
@ -103,12 +103,12 @@ export default (serverEndpoint, headers) => {
|
||||
const finalManyQuery = cloneQuery(selectQuery);
|
||||
const finalManyCountQuery = cloneQuery(countQuery);
|
||||
|
||||
finalSelectQuery.args.table = resource;
|
||||
finalSelectQuery.args.limit = params.pagination.perPage;
|
||||
finalSelectQuery.args.offset = (params.pagination.page * params.pagination.perPage) - params.pagination.perPage;
|
||||
finalSelectQuery.args.where = { [params.target]: params.id };
|
||||
finalSelectQuery.args.order_by = {column: params.sort.field, type: params.sort.order.toLowerCase()};
|
||||
finalCountQuery.args.table = resource;
|
||||
finalManyQuery.args.table = resource;
|
||||
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: params.sort.field, type: params.sort.order.toLowerCase()};
|
||||
finalManyCountQuery.args.table = resource;
|
||||
finalQuery = cloneQuery(bulkQuery);
|
||||
finalQuery.args.push(finalManyQuery);
|
||||
finalQuery.args.push(finalManyCountQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user