Skip to content

Commit e0c0d4b

Browse files
committed
update changelog for v0.2.0
1 parent 91c896a commit e0c0d4b

File tree

4 files changed

+60
-36
lines changed

4 files changed

+60
-36
lines changed

Diff for: CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.2.0 (June 30, 2021)
2+
3+
- Feature: Update only permitted fields.
4+
- Feature: Add option for custom aggregate field names.
5+
- Feature: Reference a nested object in a reference field.
6+
- Bug Fix: Issue in sanitizing a null value in an array.
7+
- Feature: Add support for nested field filtering
8+
- Bug Fix: Fix issue with null / dates
9+
- Bug Fix: Fix error with react-admin 1.13.0 for date inputs
10+
111
## 0.1.0 (January 19, 2021)
212

313
- **Breaking change**: This release is a complete rewrite of the library, replacing the API with code from `ra-data-hasura-graphql` library. The `steams/ra-data-hasura-graphql` will henceforth be archived. Refer `README.md` for usage instructions.

Diff for: dist/index.js

+47-33
Original file line numberDiff line numberDiff line change
@@ -21174,9 +21174,21 @@ PERFORMANCE OF THIS SOFTWARE.
2117421174
},
2117521175
U = (e) => (t, n, r, i) => {
2117621176
const o = G(e, t, r);
21177+
let a = null;
21178+
const u = t.type.name;
21179+
if (u) {
21180+
let t = e.types.find((e) => e.name === u + '_set_input');
21181+
if (t) {
21182+
let e = t.inputFields;
21183+
e && (a = e.map((e) => e.name));
21184+
}
21185+
}
2117721186
return Object.keys(r.data).reduce(
2117821187
(e, t) =>
21179-
r.previousData && r.data[t] === r.previousData[t] ? e : o(e, t),
21188+
(a && !a.includes(t)) ||
21189+
(r.previousData && r.data[t] === r.previousData[t])
21190+
? e
21191+
: o(e, t),
2118021192
{}
2118121193
);
2118221194
},
@@ -21321,30 +21333,30 @@ PERFORMANCE OF THIS SOFTWARE.
2132121333
[]
2132221334
);
2132321335
},
21324-
oe = (e, t, n, r, i) => (e, o, a, u) => {
21325-
const { sortField: s, sortOrder: c, ...l } = u,
21326-
f = i(a, u),
21327-
p = r(a, u),
21328-
d = n(a, l, o),
21329-
y = t(e.type, o);
21330-
return 'GET_LIST' === o ||
21331-
'GET_MANY' === o ||
21332-
'GET_MANY_REFERENCE' === o
21336+
oe = (e, t, n, r, i, o) => (e, a, u, s) => {
21337+
const { sortField: c, sortOrder: l, ...f } = s,
21338+
p = i(u, s),
21339+
d = r(u, s),
21340+
y = n(u, f, a),
21341+
v = t(e.type, a);
21342+
return 'GET_LIST' === a ||
21343+
'GET_MANY' === a ||
21344+
'GET_MANY_REFERENCE' === a
2133321345
? z.document([
2133421346
z.operationDefinition(
2133521347
'query',
2133621348
z.selectionSet([
2133721349
z.field(
21338-
z.name(a.name),
21350+
z.name(u.name),
2133921351
z.name('items'),
21340-
p,
21352+
d,
2134121353
null,
21342-
z.selectionSet(y)
21354+
z.selectionSet(v)
2134321355
),
2134421356
z.field(
21345-
z.name(a.name + '_aggregate'),
21357+
z.name(o(u.name)),
2134621358
z.name('total'),
21347-
d,
21359+
y,
2134821360
null,
2134921361
z.selectionSet([
2135021362
z.field(
@@ -21357,53 +21369,53 @@ PERFORMANCE OF THIS SOFTWARE.
2135721369
])
2135821370
),
2135921371
]),
21360-
z.name(a.name),
21361-
f
21372+
z.name(u.name),
21373+
p
2136221374
),
2136321375
])
21364-
: 'CREATE' === o ||
21365-
'UPDATE' === o ||
21366-
'UPDATE_MANY' === o ||
21367-
'DELETE' === o ||
21368-
'DELETE_MANY' === o
21376+
: 'CREATE' === a ||
21377+
'UPDATE' === a ||
21378+
'UPDATE_MANY' === a ||
21379+
'DELETE' === a ||
21380+
'DELETE_MANY' === a
2136921381
? z.document([
2137021382
z.operationDefinition(
2137121383
'mutation',
2137221384
z.selectionSet([
2137321385
z.field(
21374-
z.name(a.name),
21386+
z.name(u.name),
2137521387
z.name('data'),
21376-
p,
21388+
d,
2137721389
null,
2137821390
z.selectionSet([
2137921391
z.field(
2138021392
z.name('returning'),
2138121393
null,
2138221394
null,
2138321395
null,
21384-
z.selectionSet(y)
21396+
z.selectionSet(v)
2138521397
),
2138621398
])
2138721399
),
2138821400
]),
21389-
z.name(a.name),
21390-
f
21401+
z.name(u.name),
21402+
p
2139121403
),
2139221404
])
2139321405
: z.document([
2139421406
z.operationDefinition(
2139521407
'query',
2139621408
z.selectionSet([
2139721409
z.field(
21398-
z.name(a.name),
21410+
z.name(u.name),
2139921411
z.name('returning'),
21400-
p,
21412+
d,
2140121413
null,
21402-
z.selectionSet(y)
21414+
z.selectionSet(v)
2140321415
),
2140421416
]),
21405-
z.name(a.name),
21406-
f
21417+
z.name(u.name),
21418+
p
2140721419
),
2140821420
]);
2140921421
};
@@ -21455,6 +21467,7 @@ PERFORMANCE OF THIS SOFTWARE.
2145521467
buildMetaArgs: re,
2145621468
buildArgs: ne,
2145721469
buildApolloArgs: ie,
21470+
aggregateFieldName: (e) => e + '_aggregate',
2145821471
};
2145921472
t.default = (e, t = {}, n = Y, r = J) => {
2146021473
const i = { ...ce, ...t },
@@ -21466,7 +21479,8 @@ PERFORMANCE OF THIS SOFTWARE.
2146621479
i.buildFields,
2146721480
i.buildMetaArgs,
2146821481
i.buildArgs,
21469-
i.buildApolloArgs
21482+
i.buildApolloArgs,
21483+
i.aggregateFieldName
2147021484
),
2147121485
r
2147221486
);

Diff for: package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ra-data-hasura",
3-
"version": "0.3.1",
3+
"version": "0.2.0",
44
"description": "A data provider for connecting react-admin to a Hasura endpoint",
55
"main": "dist/index.js",
66
"sideEffects": false,

0 commit comments

Comments
 (0)