Skip to content

Commit

Permalink
Upcoming Release Changes (#10000)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
theguild-bot and github-actions[bot] authored Jun 13, 2024
1 parent 5501c62 commit cac19e5
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 67 deletions.
19 changes: 0 additions & 19 deletions .changeset/fresh-files-push.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/polite-dancers-warn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-cycles-design.md

This file was deleted.

29 changes: 0 additions & 29 deletions .changeset/spicy-starfishes-press.md

This file was deleted.

10 changes: 10 additions & 0 deletions packages/plugins/other/add/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @graphql-codegen/add

## 5.0.3

### Patch Changes

- [#9987](https://github.com/dotansimha/graphql-code-generator/pull/9987) [`5501c62`](https://github.com/dotansimha/graphql-code-generator/commit/5501c621f19eb5ef8e703a21f7367e07e41f199c) Thanks [@taro-28](https://github.com/taro-28)! - Export configuration types (e.g. `AddPluginConfig`) from the entry point.

```ts
import type { AddPluginConfig } from '@graphql-codegen/add';
```

## 5.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/other/add/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/add",
"version": "5.0.2",
"version": "5.0.3",
"description": "GraphQL Code Generator plugin for adding custom content to your output file",
"repository": {
"type": "git",
Expand Down
54 changes: 54 additions & 0 deletions packages/presets/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# @graphql-codegen/client-preset

## 4.3.0

### Minor Changes

- [#10001](https://github.com/dotansimha/graphql-code-generator/pull/10001) [`1be6e65`](https://github.com/dotansimha/graphql-code-generator/commit/1be6e65943b85162f3d465189d0a6df4b962df5d) Thanks [@n1ru4l](https://github.com/n1ru4l)! - Support discriminating `null` and `undefined` within the `useFragment` function.

```ts
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 always `TType | null | undefined`.

- [#9804](https://github.com/dotansimha/graphql-code-generator/pull/9804) [`5e594ef`](https://github.com/dotansimha/graphql-code-generator/commit/5e594ef8f39b9e1036b6bcaa977f914a66fec03e) Thanks [@rachel-church](https://github.com/rachel-church)! - Preserving `Array<T>` or `ReadonlyArray<T>` in `useFragment()` return type.

### Patch Changes

- [#9996](https://github.com/dotansimha/graphql-code-generator/pull/9996) [`99f449c`](https://github.com/dotansimha/graphql-code-generator/commit/99f449c8dcd645d49eda26e4ddfcb8ad7056ecbf) Thanks [@nahn20](https://github.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://github.com/dotansimha/graphql-code-generator/commit/5501c621f19eb5ef8e703a21f7367e07e41f199c)]:
- @graphql-codegen/add@5.0.3

## 4.2.6

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/presets/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-codegen/client-preset",
"version": "4.2.6",
"version": "4.3.0",
"description": "GraphQL Code Generator preset for client.",
"repository": {
"type": "git",
Expand All @@ -19,7 +19,7 @@
"dependencies": {
"@babel/helper-plugin-utils": "^7.20.2",
"@babel/template": "^7.20.7",
"@graphql-codegen/add": "^5.0.2",
"@graphql-codegen/add": "^5.0.3",
"@graphql-codegen/typed-document-node": "^5.0.7",
"@graphql-codegen/typescript": "^4.0.7",
"@graphql-codegen/typescript-operations": "^4.2.1",
Expand Down
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"prettier-plugin-tailwindcss": "0.2.8"
},
"dependencies": {
"@graphql-codegen/add": "5.0.2",
"@graphql-codegen/add": "5.0.3",
"@graphql-codegen/c-sharp": "4.3.1",
"@graphql-codegen/c-sharp-operations": "2.3.1",
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.2.6",
"@graphql-codegen/client-preset": "4.3.0",
"@graphql-codegen/core": "4.0.2",
"@graphql-codegen/flow": "2.3.6",
"@graphql-codegen/flow-operations": "2.3.6",
Expand Down

0 comments on commit cac19e5

Please sign in to comment.