Skip to content

Commit 9b618da

Browse files
committed
test(server-test): update cli-e2e find-first to expect single object
1 parent 65b24af commit 9b618da

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

graphql/server-test/__tests__/cli-e2e.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,8 @@ describe('CLI E2E — generated CLI against real DB', () => {
541541
);
542542

543543
const raw = JSON.parse(output);
544-
// find-first returns the connection result; extract first node
545-
const result = raw.data?.animals ?? raw;
546-
const node = result.nodes?.[0] ?? result;
544+
// find-first returns a single record (or null) under the singular field name
545+
const node = raw.data?.animal;
547546

548547
expect(node.name).toBe('Buddy');
549548
expect(node.species).toBe('Dog');

0 commit comments

Comments
 (0)