OtterSwims996
does anyone know how put vs post calls map to the trpc procedures provided? (query vs mutation)
I did check out the documentation but i only mentions GET and POST, not PUT .
https://trpc.io/docs/rpc
GET -> QUERY
POST -> MUTATE
PUT -> MUTATE ?
The reason I'm asking is because i have to create some put, post and get endpoints that were specified in a codebase but now i need to map them to trpc complements.
My best guess is that both POST and PUT calls send the payload in the request body, but GET calls send the payload in the url parameters. Since the query method lets you send information through the request body, i'm thinking i'll just use mutate call to replace the put functionality
Open to thoughts from the community on this
5 replies