Build(deps): bump @graphql-codegen/typescript-operations from 3.0.4 to 4.0.0 #1204

Merged
argoyle merged 1 commits from dependabot-npm_and_yarn-graphql-codegen-typescript-operations-4.0.0 into master 2023-05-25 15:41:55 +00:00
argoyle commented 2023-05-25 04:39:36 +00:00 (Migrated from gitlab.com)

Bumps @graphql-codegen/typescript-operations from 3.0.4 to 4.0.0.

Changelog

Sourced from @​graphql-codegen/typescript-operations's changelog.

4.0.0

Major Changes

  • #9375 ba84a3a27 Thanks @​eddeee888! - Implement Scalars with input/output types

    In GraphQL, Scalar types can be different for client and server. For example, given the native GraphQL ID:

    • A client may send string or number in the input
    • A client receives string in its selection set (i.e output)
    • A server receives string in the resolver (GraphQL parses string or number received from the client to string)
    • A server may return string or number (GraphQL serializes the value to string before sending it to the client )

    Currently, we represent every Scalar with only one type. This is what codegen generates as base type:

    export type Scalars = {
      ID: string;
    };
    

    Then, this is used in both input and output type e.g.

    export type Book = {
      __typename?: 'Book';
      id: Scalars['ID']; // Output's ID can be `string` 👍
    };
    

    export type QueryBookArgs = { id: Scalars['ID']; // Input's ID can be string or number. However, the type is only string here 👎 };

    This PR extends each Scalar to have input and output:

    export type Scalars = {
      ID: {
        input: string | number;
        output: string;
      };
    };
    

    Then, each input/output GraphQL type can correctly refer to the correct input/output scalar type:

    export type Book = {
      __typename?: 'Book';
    

... (truncated)

Commits


Dependabot commands
You can trigger Dependabot actions by commenting on this MR
  • $dependabot rebase will rebase this MR. Deprecated, use GitLab's native /rebase instead
  • $dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts
Bumps [@graphql-codegen/typescript-operations](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations) from 3.0.4 to 4.0.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/operations/CHANGELOG.md"><code>@​graphql-codegen/typescript-operations</code>'s changelog</a>.</em></p> <blockquote> <h2>4.0.0</h2> <h3>Major Changes</h3> <ul> <li> <p><a href="https://github.com/dotansimha/graphql-code-generator/pull/9375">#9375</a> <a href="https://github.com/dotansimha/graphql-code-generator/commit/ba84a3a2758d94dac27fcfbb1bafdf3ed7c32929"><code>ba84a3a27</code></a> Thanks <a href="https://github.com/eddeee888"><code>@​eddeee888</code></a>! - Implement Scalars with input/output types</p> <p>In GraphQL, Scalar types can be different for client and server. For example, given the native GraphQL ID:</p> <ul> <li>A client may send <code>string</code> or <code>number</code> in the input</li> <li>A client receives <code>string</code> in its selection set (i.e output)</li> <li>A server receives <code>string</code> in the resolver (GraphQL parses <code>string</code> or <code>number</code> received from the client to <code>string</code>)</li> <li>A server may return <code>string</code> or <code>number</code> (GraphQL serializes the value to <code>string</code> before sending it to the client )</li> </ul> <p>Currently, we represent every Scalar with only one type. This is what codegen generates as base type:</p> <pre lang="ts"><code>export type Scalars = { ID: string; }; </code></pre> <p>Then, this is used in both input and output type e.g.</p> <pre lang="ts"><code>export type Book = { __typename?: 'Book'; id: Scalars['ID']; // Output's ID can be `string` 👍 }; <p>export type QueryBookArgs = { id: Scalars['ID']; // Input's ID can be <code>string</code> or <code>number</code>. However, the type is only <code>string</code> here 👎 }; </code></pre></p> <p>This PR extends each Scalar to have input and output:</p> <pre lang="ts"><code>export type Scalars = { ID: { input: string | number; output: string; }; }; </code></pre> <p>Then, each input/output GraphQL type can correctly refer to the correct input/output scalar type:</p> <pre lang="ts"><code>export type Book = { __typename?: 'Book'; </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/5c7b3b34955a34f07906892abe39bba705fb5f5f"><code>5c7b3b3</code></a> Upcoming Release Changes (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations/issues/9355">#9355</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/e1dc75f3c598bf7f83138ca533619716fc73f823"><code>e1dc75f</code></a> Added support for <code>enumSuffix</code> (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations/issues/9304">#9304</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/ba84a3a2758d94dac27fcfbb1bafdf3ed7c32929"><code>ba84a3a</code></a> Update typescript, typescript-operations and typescript-resolvers plugins Sca...</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/5950f5a6843cdd92b9d5b8ced3a97b68eadf9f30"><code>5950f5a</code></a> fix: Don't generate invalid type names with mergeFragmentTypes (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations/issues/9369">#9369</a>)</li> <li><a href="https://github.com/dotansimha/graphql-code-generator/commit/3848a2b73339fe9f474b31647b71e75b9ca52a96"><code>3848a2b</code></a> Add <code>@defer</code> directive support (<a href="https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations/issues/9196">#9196</a>)</li> <li>See full diff in <a href="https://github.com/dotansimha/graphql-code-generator/commits/@graphql-codegen/typescript-operations@4.0.0/packages/plugins/typescript/operations">compare view</a></li> </ul> </details> <br /> --- <details> <summary>Dependabot commands</summary> <br /> You can trigger Dependabot actions by commenting on this MR - `$dependabot rebase` will rebase this MR. Deprecated, use GitLab's native /rebase instead - `$dependabot recreate` will recreate this MR rewriting all the manual changes and resolving conflicts </details>
argoyle commented 2023-05-25 15:33:35 +00:00 (Migrated from gitlab.com)

$dependabot recreate

$dependabot recreate
argoyle commented 2023-05-25 15:33:36 +00:00 (Migrated from gitlab.com)

⚠️ dependabot-gitlab is recreating merge request. All changes will be overwritten! ⚠️

:warning: `dependabot-gitlab` is recreating merge request. All changes will be overwritten! :warning:
argoyle commented 2023-05-25 15:34:54 +00:00 (Migrated from gitlab.com)

dependabot-gitlab successfully recreated merge request!

:white_check_mark: `dependabot-gitlab` successfully recreated merge request!
argoyle commented 2023-05-25 15:34:54 +00:00 (Migrated from gitlab.com)

added 6 commits

  • dfb5f1be...34d6fa8a - 5 commits from branch master
  • c16c2c59 - Build(deps): bump @graphql-codegen/typescript-operations

Compare with previous version

added 6 commits <ul><li>dfb5f1be...34d6fa8a - 5 commits from branch <code>master</code></li><li>c16c2c59 - Build(deps): bump @graphql-codegen/typescript-operations</li></ul> [Compare with previous version](/unboundsoftware/dancefinder/dancefinder-app/-/merge_requests/1155/diffs?diff_id=691279620&start_sha=dfb5f1be2860159b103ba16f138d17e67fc5f4dd)
argoyle commented 2023-05-25 15:34:54 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
argoyle (Migrated from gitlab.com) scheduled this pull request to auto merge when all checks succeed 2023-05-25 15:36:02 +00:00
argoyle (Migrated from gitlab.com) merged commit into master 2023-05-25 15:41:55 +00:00
Sign in to join this conversation.