-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: result-set decode aliases (#1129)
- Loading branch information
1 parent
f1984c4
commit 5555c20
Showing
27 changed files
with
332 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * as ResultSet from './types.js' | ||
export * as ResultSet from './infer.js' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { expect, test } from 'vitest' | ||
import { Graffle } from '../../../tests/_/schema/generated/__.js' | ||
import { $Index } from '../../../tests/_/schema/generated/modules/SchemaRuntime.js' | ||
import type * as SelectionSets from '../../../tests/_/schema/generated/modules/SelectionSets.js' | ||
import { decode } from './decode.js' | ||
|
||
test(`simple`, () => { | ||
const selectionSet = Graffle.Select.Query({ object: { id: true } }) | ||
const data = { object: { id: `x` } } | ||
// @ts-expect-error fixme | ||
expect(decode($Index.Root.Query, selectionSet, data)).toEqual(data) | ||
}) | ||
|
||
test.each<[selectionSet: SelectionSets.Query, data: object]>([ | ||
[{ id: [`x`, true] }, { x: `foo` }], | ||
[{ listInt: [`x`, true] }, { x: [1] }], | ||
[{ objectNested: { object: { id: [`x`, true] } } }, { objectNested: { object: { x: `x` } } }], | ||
])(`alias`, (selectionSet, data) => { | ||
// @ts-expect-error fixme | ||
expect(decode($Index.Root.Query, selectionSet, data)).toEqual(data) | ||
}) |
Oops, something went wrong.