Skip to content

Releases: typed-graphql-builder/typed-graphql-builder

v4.1.5

28 Aug 09:01
4614911
Compare
Choose a tag to compare

4.1.5 (2024-08-28)

Bug Fixes

v4.1.4

27 Apr 20:50
a10ba61
Compare
Choose a tag to compare

4.1.4 (2024-04-27)

Bug Fixes

  • allow nullable scalar variables when appropriate (#75) (a10ba61)

v4.1.3

14 Mar 23:32
a55d5c5
Compare
Choose a tag to compare

4.1.3 (2024-03-14)

Bug Fixes

  • Changes thrown errors to globalThis.Error (#73) (a55d5c5), closes #72

v4.1.2

03 Mar 00:26
de221d1
Compare
Choose a tag to compare

4.1.2 (2024-03-03)

Bug Fixes

v4.1.1

19 Dec 21:53
e4d9c25
Compare
Choose a tag to compare

4.1.1 (2023-12-19)

Bug Fixes

v4.1.0

16 Nov 18:40
7cb0aa5
Compare
Choose a tag to compare

4.1.0 (2023-11-16)

Features

v4.0.0

13 May 19:59
Compare
Choose a tag to compare

4.0.0 (2023-05-13)

Bug Fixes

BREAKING CHANGES

  • Fixes the behavior of non-primitive scalars.

After this PR, non-primitive scalars will only be allowed if:

  • they are nullable and the user is sending a null value, or
  • the value is sent within a variable

By using a branded type for scalars, we can precisely control the
allowed input types:

  • Scalars that are primitives (strings or numbers) can be passed inline
  • null or undefined values for scalars can also be passed directly
  • All other scalars must be passed as variables

Despite using a branded type, the user shouldn't observe any of the
branding:

  • Scalars are unwrapped when determining allowed user inputs (both
    variables and primitives)

  • Scalars are unwrapped when showing output types

  • Some queries that involved scalars will no longer be valid

  • Exported input types are no longer directly usable as they may contain
    CustomScalar branding wrappers. If upgrading, you can use the
    UnwrapCustomScalars<T> generic to replace custom scalars with their
    actual types in input types.

Before

import { MyInputObjectType } from './api.ts'

After

import { MyInputObjectType as MyInputObjectTypeWrapped, UnwrapCustomScalars} from './api.ts'

type MyInputObjectType = UnwrapCustomScalars<MyInputObjectType>

Some scalars don't need the wrapper. The script makes some effort to
auto-detect whether the scalar can be passed inline or not, and if it
was specified as --scalar ScalarName=string or --scalar ScalarName=number it will allow it. Branded primitives will
unfortunately be wrapped.

v3.5.1

20 Apr 17:55
2be2701
Compare
Choose a tag to compare

3.5.1 (2023-04-20)

Bug Fixes

v3.5.0

07 Mar 21:35
6c5e43a
Compare
Choose a tag to compare

v3.4.0

08 Feb 16:38
4b1ad4d
Compare
Choose a tag to compare

3.4.0 (2023-02-08)

Features

  • improve unions and interfaces support (#48) (4b1ad4d)