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

Fix link/core/types to be compatible with graphql typings while TypeScript exactOptionalPropertyTypes mode is enabled #10497

Merged
merged 11 commits into from
Feb 10, 2023

Commits on Jan 30, 2023

  1. Fix link/core/types to be compatible with graphql typings while TypeS…

    …cript strict mode is on
    
    When importing `@apollo/client` in a project with TS 4.9, graphql 16.6 and `strict: true`, we see the following compilation error:
    
    ```
    ./node_modules/@apollo/client/link/core/types.d.ts(44,18): error TS2430: Interface 'SingleExecutionResult<TData, TContext, TExtensions>' incorrectly extends interface 'ExecutionResult<TData, TExtensions>'.
      Types of property 'data' are incompatible.
        Type 'Data<TData>' is not assignable to type 'TData | null'.
          Type 'undefined' is not assignable to type 'TData | null'.
    ```
    
    Because `Data<TData>` expands to:
    ```ts
      data?: TData | undefined | null
    ```
    
    Which is subtly different from:
    ```ts
      data?: TData | null
    ```
    
    This fixes the type to be compatible.
    nevir committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    0ba637b View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. fix: unify data type

    alessbell committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    63e2eaa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    84e9eb6 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. Configuration menu
    Copy the full SHA
    a8de979 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bfb7be4 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. Configuration menu
    Copy the full SHA
    6a4774e View commit details
    Browse the repository at this point in the history
  2. chore: update changeset

    alessbell committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    5a0f743 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee33167 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Configuration menu
    Copy the full SHA
    b1c0129 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d62d8c9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4d552b2 View commit details
    Browse the repository at this point in the history