Skip to content

Add implicit conversion to PageConnection from Page - #9806

Merged
michaelstaib merged 3 commits into
mainfrom
mst/page-connection-implicit
May 31, 2026
Merged

michaelstaib merged 3 commits into
mainfrom
mst/page-connection-implicit

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 31, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an implicit conversion operator from GreenDonut.Data.Page<TNode> to HotChocolate.Types.Pagination.PageConnection<TNode>, removing the need for callers to explicitly wrap a Page<TNode> when returning it where a PageConnection<TNode> is expected. This aligns with documentation examples that already return Page<T> from resolvers declared as Task<PageConnection<T>>.

Changes:

  • Add implicit operator PageConnection<TNode>(Page<TNode> page) delegating to the existing constructor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@michaelstaib
michaelstaib merged commit 0d144b7 into main May 31, 2026
144 checks passed
@michaelstaib
michaelstaib deleted the mst/page-connection-implicit branch May 31, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants