Quramy / ts-graphql-plugin

TypeScript Language Service Plugin for GraphQL developers
MIT License
726 stars 26 forks source link

chore(deps): update dependency @graphql-codegen/client-preset to v4.3.0 #1340

Closed renovate[bot] closed 5 months ago

renovate[bot] commented 5 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@graphql-codegen/client-preset (source) 4.2.6 -> 4.3.0 age adoption passing confidence

Release Notes

dotansimha/graphql-code-generator (@​graphql-codegen/client-preset) ### [`v4.3.0`](https://togithub.com/dotansimha/graphql-code-generator/blob/HEAD/packages/presets/client/CHANGELOG.md#430) [Compare Source](https://togithub.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/client-preset@4.2.6...@graphql-codegen/client-preset@4.3.0) ##### Minor Changes - [#​10001](https://togithub.com/dotansimha/graphql-code-generator/pull/10001) [`1be6e65`](https://togithub.com/dotansimha/graphql-code-generator/commit/1be6e65943b85162f3d465189d0a6df4b962df5d) Thanks [@​n1ru4l](https://togithub.com/n1ru4l)! - Support discriminating `null` and `undefined` within the `useFragment` function. ```ts function MyComponent(props: FragmentType | null) { const data = useFragment(MyFragment, props); // data is `MyFragment | null` } function MyComponent(props: FragmentType | undefined) { const data = useFragment(MyFragment, props); // data is `MyFragment | undefined` } ``` Before, the returned type from `useFragment` was always `TType | null | undefined`. - [#​9804](https://togithub.com/dotansimha/graphql-code-generator/pull/9804) [`5e594ef`](https://togithub.com/dotansimha/graphql-code-generator/commit/5e594ef8f39b9e1036b6bcaa977f914a66fec03e) Thanks [@​rachel-church](https://togithub.com/rachel-church)! - Preserving `Array` or `ReadonlyArray` in `useFragment()` return type. ##### Patch Changes - [#​9996](https://togithub.com/dotansimha/graphql-code-generator/pull/9996) [`99f449c`](https://togithub.com/dotansimha/graphql-code-generator/commit/99f449c8dcd645d49eda26e4ddfcb8ad7056ecbf) Thanks [@​nahn20](https://togithub.com/nahn20)! - Added configuration to allow for custom hash functions for persisted documents in the client preset ##### Example ```ts filename="codegen.ts" {10-12} 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`](https://togithub.com/dotansimha/graphql-code-generator/commit/5501c621f19eb5ef8e703a21f7367e07e41f199c)]: - [@​graphql-codegen/add](https://togithub.com/graphql-codegen/add)[@​5](https://togithub.com/5).0.3

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.13%. Comparing base (46b7071) to head (e907cb6).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Quramy/ts-graphql-plugin/pull/1340/graphs/tree.svg?width=650&height=150&src=pr&token=Kz1gKB5U03&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yosuke+Kurami)](https://app.codecov.io/gh/Quramy/ts-graphql-plugin/pull/1340?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yosuke+Kurami) ```diff @@ Coverage Diff @@ ## main #1340 +/- ## ========================================== + Coverage 96.00% 96.13% +0.13% ========================================== Files 80 80 Lines 5956 5956 Branches 1172 898 -274 ========================================== + Hits 5718 5726 +8 + Misses 235 227 -8 Partials 3 3 ``` [see 6 files with indirect coverage changes](https://app.codecov.io/gh/Quramy/ts-graphql-plugin/pull/1340/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yosuke+Kurami)