Skip to content

Conversation

jerelmiller
Copy link

@jerelmiller jerelmiller commented Sep 8, 2025

Fixes #4333

This change fixes the fields in FormattedCompletedResult to match CompletedResult (i.e. id and errors) using the Formatted* type variants. This change also adds a FormattedPendingResult as an counterpart to PendingResult to match the type patterns already established with other Formatted* types.

I ran into this issue when working on adding support for the new incremental format in Apollo Client (apollographql/apollo-client#12906).

@jerelmiller jerelmiller requested a review from a team as a code owner September 8, 2025 21:04
@@ -156,15 +156,20 @@ export interface PendingResult {
label?: string;
}

export interface FormattedPendingResult {
Copy link
Author

@jerelmiller jerelmiller Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know there is a bit of back and forth on whether this should exist, but I went ahead and added it to continue the pattern of using Formatted* types. This is also useful as a library author so I don't have to guess why PendingResult exists, but not FormattedPendingResult.

I'm happy to pull this out if ultimately you decide it should use PendingResult. The real change I'm interested in for this fix anyways is the change to FormattedCompletedResult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant