Adds type checking for GraphQL data payload #587
Merged
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.
Basically, this PR partially reverts changes to the types made in 8f989ef.
Moreover, I added
graphql.test-d.ts
file for type definition tests using ts-expect-error which should help to ensure that graphql data response will not be broken by other refactorings in the future. Unfortunately, type checking (such astsc --noEmit
) is not a part of build pipeline at the moment, and, thus, the added tests will not stop build even if they are broken. However, this should be fixed by #579. But for now, they are only useful for TS errors in IDE. Let me know if you think that it does not make sense to have them in this PR and I will remove them.