Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming Release Changes #10000

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Upcoming Release Changes #10000

merged 1 commit into from
Jun 13, 2024

Conversation

theguild-bot
Copy link
Collaborator

@theguild-bot theguild-bot commented Jun 13, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

@graphql-codegen/[email protected]

Minor Changes

  • #10001 1be6e65 Thanks @n1ru4l! - Support discriminating null and undefined within the useFragment 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 always TType | null | undefined.

  • #9804 5e594ef Thanks @rachel-church! - Preserving Array<T> or ReadonlyArray<T> in useFragment() return type.

Patch Changes

  • #9996 99f449c Thanks @nahn20! - Added configuration to allow for custom hash functions for persisted documents in the client preset

    Example

    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]

Patch Changes

  • #9987 5501c62 Thanks @taro-28! - Export configuration types (e.g. AddPluginConfig) from the entry point.

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

Copy link
Contributor

github-actions bot commented Jun 13, 2024

🚀 Snapshot Release (rc)

The latest changes of this PR are available as rc on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/add 5.0.3-rc-20240613091802-2be8aa78acb19ca130a277eef8aebf7f6f355a53 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 4.3.0-rc-20240613091802-2be8aa78acb19ca130a277eef8aebf7f6f355a53 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Jun 13, 2024

💻 Website Preview

The latest changes are available as preview in: https://de80ab03.graphql-code-generator.pages.dev

@theguild-bot theguild-bot force-pushed the changeset-release/master branch from 09e2008 to ee00399 Compare June 13, 2024 09:13
@theguild-bot theguild-bot force-pushed the changeset-release/master branch from ee00399 to 2be8aa7 Compare June 13, 2024 09:14
@n1ru4l n1ru4l merged commit cac19e5 into master Jun 13, 2024
20 checks passed
@n1ru4l n1ru4l deleted the changeset-release/master branch June 13, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants