Skip to content
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(common): Fix the FormattedExecutionResult.errors type #621

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

pleunv
Copy link
Contributor

@pleunv pleunv commented Jan 21, 2025

https://github.com/enisdenjo/graphql-ws/releases/tag/v6.0.0 introduced a FormattedExecutionResult, however, its errors type seems to be incorrect as it's set to ReadonlyArray<FormattedExecutionResult> rather than ReadonlyArray<GraphQLFormattedError>:

/** @category Common */
export interface FormattedExecutionResult<
  Data = Record<string, unknown>,
  Extensions = Record<string, unknown>,
> {
  errors?: ReadonlyArray<FormattedExecutionResult> | undefined;
  data?: Data | null | undefined;
  hasNext?: boolean | undefined;
  extensions?: Extensions | undefined;
}

This is remediated by this PR.

Copy link
Owner

@enisdenjo enisdenjo left a comment

Choose a reason for hiding this comment

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

Oof what an oversight... Thanks!

@enisdenjo enisdenjo merged commit 6b180e8 into enisdenjo:master Jan 21, 2025
15 checks passed
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.

2 participants