Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information