Releases: dotansimha/graphql-code-generator
October 28, 2024
@graphql-codegen/[email protected]
Minor Changes
-
#9989
55a1e9e
Thanks @eddeee888! - AddgenerateInternalResolversIfNeeded
optionThis option can be used to generate more correct types for internal resolvers. For example, only generate
__resolveReference
if the federation object has a resolvable@key
.In the future, this option can be extended to support other internal resolvers e.g.
__isTypeOf
is only generated for implementing types and union members. -
#10141
a235051
Thanks @eddeee888! - Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursivelyFor users that already sets recursive default mappers e.g.
Partial<{T}>
orDeepPartial<{T}>
, having both options on will cause a nested loop which eventually crashes Codegen. In such case, settingavoidCheckingAbstractTypesRecursively: true
allows users to continue to use recursive default mappers as before.
Patch Changes
- Updated dependencies [
55a1e9e
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#9989
55a1e9e
Thanks @eddeee888! - AddgenerateInternalResolversIfNeeded
optionThis option can be used to generate more correct types for internal resolvers. For example, only generate
__resolveReference
if the federation object has a resolvable@key
.In the future, this option can be extended to support other internal resolvers e.g.
__isTypeOf
is only generated for implementing types and union members. -
#10141
a235051
Thanks @eddeee888! - Add avoidCheckingAbstractTypesRecursively to avoid checking and generating abstract types recursivelyFor users that already sets recursive default mappers e.g.
Partial<{T}>
orDeepPartial<{T}>
, having both options on will cause a nested loop which eventually crashes Codegen. In such case, settingavoidCheckingAbstractTypesRecursively: true
allows users to continue to use recursive default mappers as before.
Patch Changes
- Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
-
#10160
c7af639
Thanks @jyasskin! - Allow explicitundefined
in additional to optional arguments -
Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
Patch Changes
-
#10182
effd875
Thanks @eddeee888! - Revert slimmer client preset output -
Updated dependencies [
55a1e9e
,a235051
,c7af639
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
55a1e9e
,a235051
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#9989
55a1e9e
Thanks @eddeee888! - AddgenerateInternalResolversIfNeeded
optionThis option can be used to generate more correct types for internal resolvers. For example, only generate
__resolveReference
if the federation object has a resolvable@key
.In the future, this option can be extended to support other internal resolvers e.g.
__isTypeOf
is only generated for implementing types and union members.
October 07, 2024
@graphql-codegen/[email protected]
Patch Changes
-
#10069
8bb34e7
Thanks @renovate! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.9.20
↗︎ (from^0.8.0
, independencies
) - Updated dependency
graphql-config@^5.1.1
↗︎ (from^5.0.2
, independencies
)
- Updated dependency
-
e0092b5
Thanks @ardatan! - Bump whatwg-node and graphql-config -
Updated dependencies [
8471a18
,67e7556
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#10077
3f4f546
Thanks @eddeee888! - Extendconfig.avoidOptions
to support query, mutation and subscriptionPreviously,
config.avoidOptions.resolvers
was being used to make query, mutation and subscription fields non-optional.
Now,config.avoidOptions.query
,config.avoidOptions.mutation
andconfig.avoidOptions.subscription
can be used to target the respective types.
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
-
#10075
67e7556
Thanks @n1ru4l! - Add note about enabling bundle size reduction for the generatedgraphql
tag file. -
Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#10077
3f4f546
Thanks @eddeee888! - Extendconfig.avoidOptions
to support query, mutation and subscriptionPreviously,
config.avoidOptions.resolvers
was being used to make query, mutation and subscription fields non-optional.
Now,config.avoidOptions.query
,config.avoidOptions.mutation
andconfig.avoidOptions.subscription
can be used to target the respective types.
Patch Changes
- Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#10077
3f4f546
Thanks @eddeee888! - Extendconfig.avoidOptions
to support query, mutation and subscriptionPreviously,
config.avoidOptions.resolvers
was being used to make query, mutation and subscription fields non-optional.
Now,config.avoidOptions.query
,config.avoidOptions.mutation
andconfig.avoidOptions.subscription
can be used to target the respective types.
Patch Changes
- Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
-
#10077
3f4f546
Thanks @eddeee888! - Extendconfig.avoidOptions
to support query, mutation and subscriptionPreviously,
config.avoidOptions.resolvers
was being used to make query, mutation and subscription fields non-optional.
Now,config.avoidOptions.query
,config.avoidOptions.mutation
andconfig.avoidOptions.subscription
can be used to target the respective types.
Patch Changes
- Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
- #10073
8471a18
Thanks @n1ru4l! - Reduce noise of generated code by only generating code relevant to GraphQL operations.
Patch Changes
-
#10075
67e7556
Thanks @n1ru4l! - Add note about enabling bundle size reduction for the generatedgraphql
tag file. -
Updated dependencies [
67e7556
,3f4f546
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
3f4f546
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- #10070
5fb302c
Thanks @renovate! - dependencies updates:- Updated dependency
[email protected]
↗︎ (from13.5.3
, independencies
)
- Updated dependency
July 28, 2024
@graphql-codegen/[email protected]
Patch Changes
- #9817
7ac42a3
Thanks @nikitalocalhost! - Resolve runtime error when using the babel plugin within an ESM environment.
July 02, 2024
@graphql-codegen/[email protected]
Patch Changes
- #10014
79fee3c
Thanks @eddeee888! - Fix object types with fields being abstract types not pointing to resolver types correctly
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
-
#10014
79fee3c
Thanks @eddeee888! - Fix object types with fields being abstract types not pointing to resolver types correctly -
Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
79fee3c
]:- @graphql-codegen/[email protected]
June 30, 2024
@graphql-codegen/[email protected]
Minor Changes
- #10023
8f864ef
Thanks @eddeee888! - Allow .graphqls as schema extension
June 28, 2024
@graphql-codegen/[email protected]
Minor Changes
- #10007
808ada5
Thanks @eddeee888! - Add generated resolvers map type name to typescript-resolvers plugin meta
Patch Changes
- #10019
14ce39e
Thanks @vhfmag! - Improve code generation performance by computingClientSideBaseVisitor
'sfragmentsGraph
once at instantiation time.
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
- #10007
808ada5
Thanks @eddeee888! - Add generated resolvers map type name to typescript-resolvers plugin meta
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
808ada5
,14ce39e
]:- @graphql-codegen/[email protected]
June 13, 2024
@graphql-codegen/[email protected]
Patch Changes
-
#9987
5501c62
Thanks @taro-28! - Export configuration types (e.g.AddPluginConfig
) from the entry point.import type { AddPluginConfig } from '@graphql-codegen/add';
@graphql-codegen/[email protected]
Minor Changes
-
#10001
1be6e65
Thanks @n1ru4l! - Support discriminatingnull
andundefined
within theuseFragment
function.function MyComponent(props: FragmentType<typeof MyFragment> | null) { const data = useFragment(MyFragment, props); // data is `MyFragment | null` } function MyComponent(props: FragmentType<typeof MyFragment> | undefined) { const data = useFragment(MyFragment, props); // data is `MyFragment | undefined` }
Before, the returned type from
useFragment
was alwaysTType | null | undefined
. -
#9804
5e594ef
Thanks @rachel-church! - PreservingArray<T>
orReadonlyArray<T>
inuseFragment()
return type.
Patch Changes
-
#9996
99f449c
Thanks @nahn20! - Added configuration to allow for custom hash functions for persisted documents in the client presetExample
import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { schema: 'schema.graphql', documents: ['src/**/*.tsx'], generates: { './src/gql/': { preset: 'client', presetConfig: { persistedDocuments: { hashAlgorithm: operation => { const shasum = crypto.createHash('sha512'); shasum.update(operation); return shasum.digest('hex'); }, }, }, }, }, };
-
Updated dependencies [
5501c62
]:- @graphql-codegen/[email protected]
May 17, 2024
@graphql-codegen/[email protected]
Minor Changes
- #9961
dfc5310
Thanks @eddeee888! - Update typescript-resolvers to report generated resolver types in the run to meta field in the output
Patch Changes
-
#9944
156cc2b
Thanks @eddeee888! - Add _ prefix to generatedRefType
inResolversInterfaceTypes
andResolversUnionTypes
as it is sometimes unused -
#9962
b49457b
Thanks @eddeee888! - Fix interface mappers not working in nested/self-referencing scenarios -
Updated dependencies [
dfc5310
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
- #9961
dfc5310
Thanks @eddeee888! - Update typescript-resolvers to report generated resolver types in the run to meta field in the output
Patch Changes
-
#9944
156cc2b
Thanks @eddeee888! - Add _ prefix to generatedRefType
inResolversInterfaceTypes
andResolversUnionTypes
as it is sometimes unused -
#9962
b49457b
Thanks @eddeee888! - Fix interface mappers not working in nested/self-referencing scenarios -
Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
dfc5310
,156cc2b
,dfc5310
,b49457b
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- #9961
dfc5310
Thanks @eddeee888! - Update plugin output type to allow optionmeta
field
March 27, 2024
@graphql-codegen/[email protected]
Patch Changes
- #9881
68ea5d4
Thanks @renovate! - dependencies updates:- Updated dependency
moment@~2.30.0
↗︎ (from~2.29.1
, independencies
)
- Updated dependency
@graphql-codegen/[email protected]
Patch Changes
- #9889
cd60e14
Thanks @Sojaner! - Omit__typename
from being added on the root node of a subscription when usingaddTypenameSelectionDocumentTransform
with documentTransforms since a single root node is expected and the code generator fails because of that (refer to https://spec.graphql.org/draft/#sec-Single-root-field)
February 22, 2024
@graphql-codegen/[email protected]
Minor Changes
Patch Changes
- #9842
ed9c205
Thanks @henryqdineen! - properly handle aliased conditionals
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Minor Changes
Patch Changes
-
#9842
ed9c205
Thanks @henryqdineen! - properly handle aliased conditionals -
Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
- Updated dependencies [
920b443
,ed9c205
]:- @graphql-codegen/[email protected]
@graphql-codegen/[email protected]
Patch Changes
-
#9627
422e2a7
Thanks @renovate! - dependencies updates:- Updated dependency
[email protected]
↗︎ (from13.3.1
, independencies
)
- Updated dependency
-
#9851
217ed56
Thanks @renovate! - dependencies updates:- Updated dependency
[email protected]
↗︎ (from13.3.6
, independencies
)
- Updated dependency