This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
Remove TData generic, fixing GraphQL 15 compile #1262
Closed
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.
In earlier versions of GraphQL, the ExecutionResult took a generic parameter, which it then typecast its return type as. We were, however, just sending
{ [key: string]: any }
for this parameter in all internal cases.As of GraphQL 15, that generic parameter has been removed, (see this PR)[https://github.com/graphql/graphql-js/pull/2490/commits], and the return type has been fixed to always be
{ [key: string]: any }
.Since this is already compatible with our default, this PR removes the generic parameter to bring our typing in line with GraphQL's typing. This is, however, a breaking change for anyone who was depending on this generic parameter to do their typecast for them.
TODO: