Skip to content

Commit

Permalink
handle arrray re-orders in multiply nested paths
Browse files Browse the repository at this point in the history
  • Loading branch information
infiton committed Dec 9, 2024
1 parent 4e82100 commit 0d96d2e
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@gadget-client/app-with-no-user-model": "^1.10.0",
"@gadget-client/bulk-actions-test": "^1.113.0",
"@gadget-client/full-auth": "^1.9.0",
"@gadget-client/js-clients-test": "1.499.0-development.2005",
"@gadget-client/js-clients-test": "1.508.0-development.2265",
"@gadget-client/kitchen-sink": "1.9.0-development.206",
"@gadget-client/related-products-example": "^1.865.0",
"@gadget-client/zxcv-deeply-nested": "^1.212.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ describe("PolarisAutoBelongsToInput", () => {
// This simulates the response when the related record is queried to get the related model record value
id: "42",
sectionId: "1",
section: { id: "1", name: "Section 1" },
__typename: "Widget",
}
: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
}
},
{
"_id": "92f0993ea7a9aba2b2055384d7e2c25b",
"_id": "0523aa94388d3d9c8c46302084a73ecf",
"_order": 0,
"cache": {},
"request": {
Expand Down Expand Up @@ -212,7 +212,7 @@
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"operationName\":\"updateQuiz\",\"query\":\"mutation updateQuiz($id: GadgetID!, $quiz: UpdateQuizInput) {\\n updateQuiz(id: $id, quiz: $quiz) {\\n success\\n errors {\\n message\\n code\\n ... on InvalidRecordError {\\n model {\\n apiIdentifier\\n __typename\\n }\\n validationErrors {\\n message\\n apiIdentifier\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n quiz {\\n id\\n text\\n questions {\\n edges {\\n node {\\n id\\n text\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n gadgetMeta {\\n hydrations(modelName: \\n\\\"quiz\\\")\\n __typename\\n }\\n}\",\"variables\":{\"id\":\"168\",\"quiz\":{\"questions\":[{\"update\":{\"id\":\"1774\",\"text\":\"test question updated - 1\"}},{\"update\":{\"id\":\"1775\",\"text\":\"test question updated - 2\"}}],\"text\":\"test quiz updated\"}}}"
"text": "{\"operationName\":\"updateQuiz\",\"query\":\"mutation updateQuiz($id: GadgetID!, $quiz: UpdateQuizInput) {\\n updateQuiz(id: $id, quiz: $quiz) {\\n success\\n errors {\\n message\\n code\\n ... on InvalidRecordError {\\n model {\\n apiIdentifier\\n __typename\\n }\\n validationErrors {\\n message\\n apiIdentifier\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n quiz {\\n id\\n text\\n questions {\\n edges {\\n node {\\n id\\n text\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n __typename\\n }\\n gadgetMeta {\\n hydrations(modelName: \\n\\\"quiz\\\")\\n __typename\\n }\\n}\",\"variables\":{\"id\":\"168\",\"quiz\":{\"questions\":[{\"update\":{\"id\":\"1775\",\"text\":\"test question updated - 2\"}},{\"update\":{\"id\":\"1774\",\"text\":\"test question updated - 1\"}}],\"text\":\"test quiz updated\"}}}"
},
"queryString": [
{
Expand All @@ -228,13 +228,13 @@
"encoding": "base64",
"mimeType": "application/json; charset=utf-8",
"size": 432,
"text": "[\"H4sIAAAAAAAAA5yRy2rDMBBFf8XMWq3t4FiJdqEtpYsuUtpVKUGRJoqoI7vSGPLA/16UVyEmBLrUzJ1zR3N3oCVJEDtoGy0Jp63dxldolcIQQJBvkQF6X/sAwrVVxeDnKLIaBOTlCBgQrgkEEAZKYjs54DRENQaytQtxBLXBAOJzB67W+AfhvOhRDmMnUnKX5MBgNqNNg06uEARMjxrorjSetEHoWN9teNtt8E+3ryvdh9o5VFcAdtsrfpwDecPQVhQFRmqD9IqHyJYb7eX5tMpj3HwS//QoCd/tCoEdc70oX3o977mTpqms2hP3Fl3HANeELpw8qtoEELAkaoJIU2PovrLuO431NB9mZTZK52qecZ4PcIyLsZRFKTmOJceyyDTP1SJe3kuFLzGKm+Ku+wUAAP//AwCwUnbFowIAAA==\"]"
"text": "[\"H4sIAAAAAAAAA5yRy07DMBBFfyWatSEJpXl4VwFCLFgUwQqhyrIH1yJ1gj2R+lD+Hblpi9QoqtSlZ+6cO567AyVIAN9B2yhBOG/NNrx8KyV6D5xciwzQudp54LatKga/B5FRwCHNCmBAuCbgQOgpCu2oxykIavRkauvDCCqNHvjnDmyt8B+S5/cDSj92JEU3UQoMFgvaNGjFCoHD/KCBbqTxpDRCx4Zu08tud1e6fY10H2prUY4AzHZQ/DgF8oa+rSgItFAa6RX7yJYb5cTptNJh2HwW/vQoCN/NCoEdcj0rn3s977mzpqmM3BP3Fl3HANeE1h89qlp74LAkajyPY63ptjL2Jw71OJ0mWVLEQpRqkucqK8qJKPNpkWYqS4qs/C4nhUQZLu+ExJcQxUVx1/0BAAD//wMAgXoqlqMCAAA=\"]"
},
"cookies": [],
"headers": [
{
"name": "date",
"value": "Wed, 28 Aug 2024 23:51:06 GMT"
"value": "Fri, 06 Dec 2024 18:26:09 GMT"
},
{
"name": "content-type",
Expand All @@ -246,7 +246,7 @@
},
{
"name": "connection",
"value": "close"
"value": "keep-alive"
},
{
"name": "vary",
Expand All @@ -266,11 +266,11 @@
},
{
"name": "x-request-id",
"value": "71e6f976bdf5819fc5352d25a97baf5e"
"value": "dd9c1c42bb00562cc941b60f9875c713"
},
{
"name": "x-trace-id",
"value": "bcb07712e9ef9aa46a7e9a7e640d71cf"
"value": "aa9d377d6893a975816d60869f938cec"
},
{
"name": "strict-transport-security",
Expand All @@ -290,7 +290,7 @@
},
{
"name": "cf-ray",
"value": "8ba8351979ccac96-YYZ"
"value": "8ede5285385d6a57-EWR"
},
{
"name": "content-encoding",
Expand All @@ -301,22 +301,22 @@
"value": "h3=\":443\"; ma=86400"
}
],
"headersSize": 612,
"headersSize": 617,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-08-28T23:51:06.347Z",
"time": 328,
"startedDateTime": "2024-12-06T18:26:06.129Z",
"time": 3295,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 328
"wait": 3295
}
}
],
Expand Down
1 change: 1 addition & 0 deletions packages/react/spec/auto/hooks/useTable.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ describe("useTable hook", () => {
name
}
secretKey
sectionId
startsAt
updatedAt
}
Expand Down
Loading

0 comments on commit 0d96d2e

Please sign in to comment.