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

feat(server): add partykit adapter #5536

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from
Draft

Conversation

overra
Copy link

@overra overra commented Mar 4, 2024

Note

Work in progress: currently adding a partykit example to test with.

Closes #

🎯 Changes

This adds an adapter for partykit.

Exports

  • tRPCPartyServer as an extension of Party.Server, to be used in its place
  • applyParty accepts an options object with: instance (instance of tRPCPartyServer), router, prefix, createContext, createWssContext, onError

✅ Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
trpc-next-app-dir ❌ Failed (Inspect) Mar 4, 2024 8:12am
www ❌ Failed (Inspect) Mar 4, 2024 8:12am

Copy link

vercel bot commented Mar 4, 2024

@overra is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@KATT KATT left a comment

Choose a reason for hiding this comment

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

Hey!

Thanks so much for this PR!

For now, we don't want to add more adapters to tRPC itself - they're quite a bit of work to maintain. Instead, please create a userland package called trpc-partykit or something of the like.

If we can get the team at @partykit to maintain and/or sponsor maintenance of this, we'd be open to adding it as a first-class citizen.

@overra
Copy link
Author

overra commented Mar 4, 2024

For now, we don't want to add more adapters to tRPC itself - they're quite a bit of work to maintain. Instead, please create a userland package called trpc-partykit or something of the like.

I didn't think about the additional maintenance overhead, and I appreciate the way you addressed this. I noticed the closed bun adapter PR w/ a userland package link, and wasn't sure what prompted them to go that route.

If we can get the team at @partykit to maintain and/or sponsor maintenance of this, we'd be open to adding it as a first-class citizen.

👀 Either way, I'm down! I'm just excited to combine the two.

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