Skip to content

Commit 0a4db65

Browse files
authored
fix(utils): make makeAddPgTableConditionPlugin work on simple co… (#569)
1 parent 44523bd commit 0a4db65

6 files changed

Lines changed: 762 additions & 7 deletions

File tree

packages/graphile-utils/__tests__/ExtendSchemaPlugin-pg.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ it("allows adding a custom connection to a nested type", async () => {
583583
expect(bob.p2.totalCount).toEqual(2);
584584
expect(caroline.p2).toBeTruthy();
585585
expect(caroline.p2.nodes).toHaveLength(2);
586-
expect(caroline.p2.totalCount).toEqual(2);
586+
expect(caroline.p2.totalCount).toEqual(3);
587587
expect(caroline.p2.nodes.map(n => n.name)).toEqual(["Goldie", "Spot"]);
588588
expect(data).toMatchSnapshot();
589589
} finally {
@@ -829,6 +829,7 @@ it("allows to retrieve array scalar values", async () => {
829829
"Fido",
830830
"Goldie",
831831
"Spot",
832+
"Albert",
832833
]);
833834
} finally {
834835
pgClient.release();

packages/graphile-utils/__tests__/__snapshots__/ExtendSchemaPlugin-pg.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,11 +719,11 @@ Object {
719719
],
720720
"pageInfo": Object {
721721
"endCursor": "WyJwcmltYXJ5X2tleV9hc2MiLFs0XV0=",
722-
"hasNextPage": false,
722+
"hasNextPage": true,
723723
"hasPreviousPage": true,
724724
"startCursor": "WyJwcmltYXJ5X2tleV9hc2MiLFs0XV0=",
725725
},
726-
"totalCount": 2,
726+
"totalCount": 3,
727727
},
728728
"p2": Object {
729729
"edges": Array [
@@ -750,11 +750,11 @@ Object {
750750
],
751751
"pageInfo": Object {
752752
"endCursor": "WyJwcmltYXJ5X2tleV9hc2MiLFs0XV0=",
753-
"hasNextPage": false,
753+
"hasNextPage": true,
754754
"hasPreviousPage": false,
755755
"startCursor": "WyJwcmltYXJ5X2tleV9hc2MiLFszXV0=",
756756
},
757-
"totalCount": 2,
757+
"totalCount": 3,
758758
},
759759
},
760760
],

0 commit comments

Comments
 (0)