From 776eb8d2091aa5b2855c4da91ec3789cc3ca1ac2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 10:12:57 +1000 Subject: [PATCH] Version Packages (#15) Co-authored-by: github-actions[bot] --- .changeset/nine-seals-watch.md | 22 ---------------------- packages/schema/CHANGELOG.md | 23 +++++++++++++++++++++++ packages/schema/package.json | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) delete mode 100644 .changeset/nine-seals-watch.md diff --git a/.changeset/nine-seals-watch.md b/.changeset/nine-seals-watch.md deleted file mode 100644 index 5389200..0000000 --- a/.changeset/nine-seals-watch.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@graphql-ts/schema": patch ---- - -Fixed having a union of `Arg`s where at least one is nullable without a default value not resulting in an inferred input type that includes `undefined` in the union. - -```ts -graphql.field({ - type: graphql.String, - args: { - something: graphql.arg({ - type: - Math.random() > 0.5 ? graphql.nonNull(graphql.String) : graphql.String, - }), - }, - resolve(source, { something }) { - const previouslyIncorrectlyAllowedNowError: string | null = something; - const correct: string | null | undefined = something; - return ""; - }, -}); -``` diff --git a/packages/schema/CHANGELOG.md b/packages/schema/CHANGELOG.md index 7ca5f93..354bbdc 100644 --- a/packages/schema/CHANGELOG.md +++ b/packages/schema/CHANGELOG.md @@ -1,5 +1,28 @@ # @graphql-ts/schema +## 0.5.3 + +### Patch Changes + +- [`3663690`](https://github.com/Thinkmill/graphql-ts/commit/3663690f9063c72933465a6ee369795f8d1d864e) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fixed having a union of `Arg`s where at least one is nullable without a default value not resulting in an inferred input type that includes `undefined` in the union. + + ```ts + graphql.field({ + type: graphql.String, + args: { + something: graphql.arg({ + type: + Math.random() > 0.5 ? graphql.nonNull(graphql.String) : graphql.String + }) + }, + resolve(source, { something }) { + const previouslyIncorrectlyAllowedNowError: string | null = something; + const correct: string | null | undefined = something; + return ""; + } + }); + ``` + ## 0.5.2 ### Patch Changes diff --git a/packages/schema/package.json b/packages/schema/package.json index 7e8b8fd..5d5b45c 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-ts/schema", - "version": "0.5.2", + "version": "0.5.3", "main": "dist/graphql-ts-schema.cjs.js", "module": "dist/graphql-ts-schema.esm.js", "files": [