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 TypeScript types for flattenConnection #945

Merged
merged 2 commits into from
May 25, 2023
Merged

Conversation

frehner
Copy link
Contributor

@frehner frehner commented May 25, 2023

WHY are these changes introduced?

Apparently I've had the TS types for edges wrong for a while. Whoops. This also fixes issues that were raised in #937

Updated the docs, and apparently we never did build-docs after updating the static page. Whoops again.

WHAT is this pull request doing?

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

if (!edge?.node) {
throw new Error(
'flattenConnection(): Connection edges must contain nodes',
);
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should have realized something was wrong here. Glad it's fixed these errors though.

@frehner frehner requested a review from a team May 25, 2023 16:28
Copy link
Contributor

@blittle blittle left a comment

Choose a reason for hiding this comment

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

Thank you @frehner!

@frehner frehner merged commit 7d6a1a7 into 2023-04 May 25, 2023
10 checks passed
@frehner frehner deleted the connection-types branch May 25, 2023 20:19
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.

None yet

2 participants