Skip to content

Commit 83f3094

Browse files
committed
test(server-test): update cli-e2e find-first to expect single object
1 parent 53a377d commit 83f3094

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
@@ -542,9 +542,8 @@ describe('CLI E2E — generated CLI against real DB', () => {
542542
);
543543

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

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

0 commit comments

Comments
 (0)