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

TRPC adder #360

Open
bato3 opened this issue May 15, 2024 · 2 comments
Open

TRPC adder #360

bato3 opened this issue May 15, 2024 · 2 comments

Comments

@bato3
Copy link

bato3 commented May 15, 2024

Website

https://trpc.io/

Documentation

https://icflorescu.github.io/trpc-sveltekit/getting-started

Integration summary

1 Install the trpc-sveltekit package and its dependencies with:

npm i trpc-sveltekit @trpc/server @trpc/client

2 Create your tRPC router:

3 Create a tRPC context:

4 Add this handle to your SvelteKit app hooks:

5 Define a helper function to easily use the tRPC client in your pages:

6 Call the tRPC procedures in your pages:

Further details

No response

@manuel3108
Copy link
Member

I have never worked with this tool before, do I understand that correctly that it will only be useful for the svelte experience. It should not be necessary in kit if I see that correctly. Is that correct?

@bato3
Copy link
Author

bato3 commented May 20, 2024

To put it simply: RPC (remote procedure call) is an alternative communication protocol to REST / GraphQL.

tRPC allows you to easily build & consume fully typesafe APIs without schemas or code generation.

So the answer is not that simple.

It may be full integration in SK, it may be the tRPC server itself or the client itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants