|
4 | 4 |
|
5 | 5 | ### Minor Changes
|
6 | 6 |
|
7 |
| -- [`012d84e`](https://github.com/Thinkmill/graphql-ts/commit/012d84e04bfe37c18aa0afdc541843586cf768bf) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added `exports` field |
| 7 | +- [`012d84e`](https://github.com/Thinkmill/graphql-ts/commit/012d84e04bfe37c18aa0afdc541843586cf768bf) Thanks [@emmatown](https://github.com/emmatown)! - Added `exports` field |
8 | 8 |
|
9 | 9 | ## 0.5.3
|
10 | 10 |
|
11 | 11 | ### Patch Changes
|
12 | 12 |
|
13 |
| -- [`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. |
| 13 | +- [`3663690`](https://github.com/Thinkmill/graphql-ts/commit/3663690f9063c72933465a6ee369795f8d1d864e) Thanks [@emmatown](https://github.com/emmatown)! - 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. |
14 | 14 |
|
15 | 15 | ```ts
|
16 | 16 | graphql.field({
|
17 | 17 | type: graphql.String,
|
18 | 18 | args: {
|
19 | 19 | something: graphql.arg({
|
20 | 20 | type:
|
21 |
| - Math.random() > 0.5 ? graphql.nonNull(graphql.String) : graphql.String |
22 |
| - }) |
| 21 | + Math.random() > 0.5 |
| 22 | + ? graphql.nonNull(graphql.String) |
| 23 | + : graphql.String, |
| 24 | + }), |
23 | 25 | },
|
24 | 26 | resolve(source, { something }) {
|
25 | 27 | const previouslyIncorrectlyAllowedNowError: string | null = something;
|
26 | 28 | const correct: string | null | undefined = something;
|
27 | 29 | return "";
|
28 |
| - } |
| 30 | + }, |
29 | 31 | });
|
30 | 32 | ```
|
31 | 33 |
|
32 | 34 | ## 0.5.2
|
33 | 35 |
|
34 | 36 | ### Patch Changes
|
35 | 37 |
|
36 |
| -- [`3e4909f`](https://github.com/Thinkmill/graphql-ts/commit/3e4909f3885a0edf3d989f8ce598f91473f97446) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fixed `Field<_, _, _, string, _>` not being assignable to `Field<_, _, _, "literal", _>` |
| 38 | +- [`3e4909f`](https://github.com/Thinkmill/graphql-ts/commit/3e4909f3885a0edf3d989f8ce598f91473f97446) Thanks [@emmatown](https://github.com/emmatown)! - Fixed `Field<_, _, _, string, _>` not being assignable to `Field<_, _, _, "literal", _>` |
37 | 39 |
|
38 | 40 | ## 0.5.1
|
39 | 41 |
|
40 | 42 | ### Patch Changes
|
41 | 43 |
|
42 |
| -- [`ef18bba`](https://github.com/Thinkmill/graphql-ts/commit/ef18bba55773e38309f538b987099650ad66533d) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added declaration maps |
| 44 | +- [`ef18bba`](https://github.com/Thinkmill/graphql-ts/commit/ef18bba55773e38309f538b987099650ad66533d) Thanks [@emmatown](https://github.com/emmatown)! - Added declaration maps |
43 | 45 |
|
44 |
| -* [`65391d3`](https://github.com/Thinkmill/graphql-ts/commit/65391d30c7a56313325acb647110e8536008d82b) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - `graphql@16` is now allowed in `peerDependencies` |
| 46 | +* [`65391d3`](https://github.com/Thinkmill/graphql-ts/commit/65391d30c7a56313325acb647110e8536008d82b) Thanks [@emmatown](https://github.com/emmatown)! - `graphql@16` is now allowed in `peerDependencies` |
45 | 47 |
|
46 | 48 | ## 0.5.0
|
47 | 49 |
|
48 | 50 | ### Minor Changes
|
49 | 51 |
|
50 |
| -- [`5d1c299`](https://github.com/Thinkmill/graphql-ts/commit/5d1c299ae50a8bafea8e409f9c2c1e5abedaa29a) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Type parameters named `RootVal` have been renamed to `Source` and properties named `__rootVal` have been renamed to `__source`. This won't require code changes unless you've relied on the `__rootVal` properties(which you shouldn't). |
| 52 | +- [`5d1c299`](https://github.com/Thinkmill/graphql-ts/commit/5d1c299ae50a8bafea8e409f9c2c1e5abedaa29a) Thanks [@emmatown](https://github.com/emmatown)! - Type parameters named `RootVal` have been renamed to `Source` and properties named `__rootVal` have been renamed to `__source`. This won't require code changes unless you've relied on the `__rootVal` properties(which you shouldn't). |
51 | 53 |
|
52 | 54 | ## 0.4.0
|
53 | 55 |
|
54 | 56 | ### Minor Changes
|
55 | 57 |
|
56 |
| -- [`910d1ed`](https://github.com/Thinkmill/graphql-ts/commit/910d1edc596f4a17b0a3dec3e3df8ebd94a5cb80) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Replaced `fields` property on `InterfaceType` with `__fields` that does not exist at runtime to align with other types |
| 58 | +- [`910d1ed`](https://github.com/Thinkmill/graphql-ts/commit/910d1edc596f4a17b0a3dec3e3df8ebd94a5cb80) Thanks [@emmatown](https://github.com/emmatown)! - Replaced `fields` property on `InterfaceType` with `__fields` that does not exist at runtime to align with other types |
57 | 59 |
|
58 | 60 | ### Patch Changes
|
59 | 61 |
|
60 |
| -- [`6c85396`](https://github.com/Thinkmill/graphql-ts/commit/6c85396eee29d6eea75c43f54e50b90a3e63a266) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Updated the definition of `graphql.union` so that the `Context` of the `UnionType` returned and the `Context` passed to `resolveType` are determined by the `Context` of the `graphql` object rather than a union of the `Context`s of the union's member types. |
| 62 | +- [`6c85396`](https://github.com/Thinkmill/graphql-ts/commit/6c85396eee29d6eea75c43f54e50b90a3e63a266) Thanks [@emmatown](https://github.com/emmatown)! - Updated the definition of `graphql.union` so that the `Context` of the `UnionType` returned and the `Context` passed to `resolveType` are determined by the `Context` of the `graphql` object rather than a union of the `Context`s of the union's member types. |
61 | 63 |
|
62 | 64 | ## 0.3.1
|
63 | 65 |
|
64 | 66 | ### Patch Changes
|
65 | 67 |
|
66 |
| -- [`1e10a22`](https://github.com/Thinkmill/graphql-ts/commit/1e10a228e59b206f86e963d423567486fa590aab) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fixed broken links in JSDoc comments |
| 68 | +- [`1e10a22`](https://github.com/Thinkmill/graphql-ts/commit/1e10a228e59b206f86e963d423567486fa590aab) Thanks [@emmatown](https://github.com/emmatown)! - Fixed broken links in JSDoc comments |
67 | 69 |
|
68 | 70 | ## 0.3.0
|
69 | 71 |
|
70 | 72 | ### Minor Changes
|
71 | 73 |
|
72 |
| -- [`6e9a2fb`](https://github.com/Thinkmill/graphql-ts/commit/6e9a2fb1b5dd2965bc9e2783dfddd8a2bacf88f6) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Renamed the following exports: |
| 74 | +- [`6e9a2fb`](https://github.com/Thinkmill/graphql-ts/commit/6e9a2fb1b5dd2965bc9e2783dfddd8a2bacf88f6) Thanks [@emmatown](https://github.com/emmatown)! - Renamed the following exports: |
73 | 75 |
|
74 | 76 | - `schema` → `graphql`
|
75 | 77 | - `bindSchemaAPIToContext` → `bindGraphQLSchemaAPIToContext`
|
|
79 | 81 |
|
80 | 82 | ### Minor Changes
|
81 | 83 |
|
82 |
| -- [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed `MaybeFunc` export |
| 84 | +- [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@emmatown](https://github.com/emmatown)! - Removed `MaybeFunc` export |
83 | 85 |
|
84 |
| -* [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Changed the second type parameter of `Arg` from `DefaultValue extends InferValueFromInputType<Type> | undefined = InferValueFromInputType<Type> | undefined` to `HasDefaultValue extends boolean = boolean`. This makes it easier to type circular input objects because you TypeScript won't emit a circularity error and require you to provide a value for the second type parameter. For example, previously to type a circular input object, it looked like this where `undefined` had to be passed: |
| 86 | +* [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@emmatown](https://github.com/emmatown)! - Changed the second type parameter of `Arg` from `DefaultValue extends InferValueFromInputType<Type> | undefined = InferValueFromInputType<Type> | undefined` to `HasDefaultValue extends boolean = boolean`. This makes it easier to type circular input objects because you TypeScript won't emit a circularity error and require you to provide a value for the second type parameter. For example, previously to type a circular input object, it looked like this where `undefined` had to be passed: |
85 | 87 |
|
86 | 88 | ```ts
|
87 | 89 | type CircularInputType = schema.InputObjectType<{
|
|
91 | 93 | const Circular: CircularInputType = schema.inputObject({
|
92 | 94 | name: "Circular",
|
93 | 95 | fields: () => ({
|
94 |
| - circular: schema.arg({ type: Circular }) |
95 |
| - }) |
| 96 | + circular: schema.arg({ type: Circular }), |
| 97 | + }), |
96 | 98 | });
|
97 | 99 | ```
|
98 | 100 |
|
|
106 | 108 | const Circular: CircularInputType = schema.inputObject({
|
107 | 109 | name: "Circular",
|
108 | 110 | fields: () => ({
|
109 |
| - circular: schema.arg({ type: Circular }) |
110 |
| - }) |
| 111 | + circular: schema.arg({ type: Circular }), |
| 112 | + }), |
111 | 113 | });
|
112 | 114 | ```
|
113 | 115 |
|
114 | 116 | ### Patch Changes
|
115 | 117 |
|
116 |
| -- [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fixed list types that contain output types being assignable to `NullableInputType`/`InputType` |
| 118 | +- [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@emmatown](https://github.com/emmatown)! - Fixed list types that contain output types being assignable to `NullableInputType`/`InputType` |
117 | 119 |
|
118 |
| -* [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - JSDoc improvements |
| 120 | +* [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@emmatown](https://github.com/emmatown)! - JSDoc improvements |
119 | 121 |
|
120 |
| -- [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Resolvers are now allowed to return `undefined` in addition to `null` for fields with nullable output types along with optional properties on a `RootVal` without a resolver being allowed. Resolvers still cannot return `void`(no return) and a property being missing from a `RootVal` without a resolver is still disallowed. |
| 122 | +- [#5](https://github.com/Thinkmill/graphql-ts/pull/5) [`9f2e0fa`](https://github.com/Thinkmill/graphql-ts/commit/9f2e0fab2c7c483c3f4c13b285d6a33e75bb563c) Thanks [@emmatown](https://github.com/emmatown)! - Resolvers are now allowed to return `undefined` in addition to `null` for fields with nullable output types along with optional properties on a `RootVal` without a resolver being allowed. Resolvers still cannot return `void`(no return) and a property being missing from a `RootVal` without a resolver is still disallowed. |
121 | 123 |
|
122 | 124 | ## 0.1.2
|
123 | 125 |
|
124 | 126 | ### Patch Changes
|
125 | 127 |
|
126 |
| -- [`6e4562f`](https://github.com/Thinkmill/graphql-ts/commit/6e4562fbeaf0c3e1b2dfba215bfe08cd957ae8fd) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Updated mentions of `types.` to `schema.` in JSDoc comments |
| 128 | +- [`6e4562f`](https://github.com/Thinkmill/graphql-ts/commit/6e4562fbeaf0c3e1b2dfba215bfe08cd957ae8fd) Thanks [@emmatown](https://github.com/emmatown)! - Updated mentions of `types.` to `schema.` in JSDoc comments |
127 | 129 |
|
128 | 130 | ## 0.1.1
|
129 | 131 |
|
130 | 132 | ### Patch Changes
|
131 | 133 |
|
132 |
| -- [`25e4344`](https://github.com/Thinkmill/graphql-ts/commit/25e4344764f509152e1bae47f09b9633026db517) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - When using list types, you can now return iterables instead of only arrays from resolvers |
| 134 | +- [`25e4344`](https://github.com/Thinkmill/graphql-ts/commit/25e4344764f509152e1bae47f09b9633026db517) Thanks [@emmatown](https://github.com/emmatown)! - When using list types, you can now return iterables instead of only arrays from resolvers |
133 | 135 |
|
134 |
| -* [`25e4344`](https://github.com/Thinkmill/graphql-ts/commit/25e4344764f509152e1bae47f09b9633026db517) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added JSDoc comments to most fields on `SchemaAPIWithContext` |
| 136 | +* [`25e4344`](https://github.com/Thinkmill/graphql-ts/commit/25e4344764f509152e1bae47f09b9633026db517) Thanks [@emmatown](https://github.com/emmatown)! - Added JSDoc comments to most fields on `SchemaAPIWithContext` |
135 | 137 |
|
136 | 138 | ## 0.1.0
|
137 | 139 |
|
138 | 140 | ### Minor Changes
|
139 | 141 |
|
140 |
| -- [`2c9d25a`](https://github.com/Thinkmill/graphql-ts/commit/2c9d25ab7724a8a460b337a4a529accc0d3169ec) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Initial release |
| 142 | +- [`2c9d25a`](https://github.com/Thinkmill/graphql-ts/commit/2c9d25ab7724a8a460b337a4a529accc0d3169ec) Thanks [@emmatown](https://github.com/emmatown)! - Initial release |
0 commit comments