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 parsing of args to tRPC vanilla client for mutations #63

Merged

Conversation

oscartbeaumont
Copy link
Contributor

@oscartbeaumont oscartbeaumont commented May 17, 2024

The following does not currently work:

trpc.some.query.createMutation(() => ({
   trpc: {
       context: { a: true }
   }
}));

trpc.context can be accessed within tRPC links and currently it is not correctly set for mutations.

This PR should fix it by correctly calling the opts function before parsing it to the tRPC Vanilla client.

Copy link

changeset-bot bot commented May 17, 2024

🦋 Changeset detected

Latest commit: bc429dc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-mediakit/trpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented May 17, 2024

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

Name Status Preview Comments Updated (UTC)
mediakit ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 11:42am

@OrJDev OrJDev merged commit 0b756da into solidjs-community:main May 28, 2024
2 checks passed
@OrJDev
Copy link
Collaborator

OrJDev commented May 28, 2024

Thank you

@oscartbeaumont oscartbeaumont deleted the fix-mutation-trpc-args branch May 29, 2024 03:24
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