-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Commits on Jan 30, 2023
-
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.
Configuration menu - View commit details
-
Copy full SHA for 0ba637b - Browse repository at this point
Copy the full SHA 0ba637bView commit details
Commits on Feb 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 63e2eaa - Browse repository at this point
Copy the full SHA 63e2eaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 84e9eb6 - Browse repository at this point
Copy the full SHA 84e9eb6View commit details
Commits on Feb 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a8de979 - Browse repository at this point
Copy the full SHA a8de979View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfb7be4 - Browse repository at this point
Copy the full SHA bfb7be4View commit details
Commits on Feb 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6a4774e - Browse repository at this point
Copy the full SHA 6a4774eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a0f743 - Browse repository at this point
Copy the full SHA 5a0f743View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee33167 - Browse repository at this point
Copy the full SHA ee33167View commit details
Commits on Feb 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b1c0129 - Browse repository at this point
Copy the full SHA b1c0129View commit details -
Configuration menu - View commit details
-
Copy full SHA for d62d8c9 - Browse repository at this point
Copy the full SHA d62d8c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d552b2 - Browse repository at this point
Copy the full SHA 4d552b2View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.