-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
docs(digging-deeper:tuyau): first draft of documentation #194
base: main
Are you sure you want to change the base?
Conversation
Thankssss was wondering, what about adding a new "RPC" section in the sidebar that would include “Installation” / “Superjson” / “Inertia” / “RPC client” instead of putting everything on a single page? "RPC" is probably not the best term, but I don’t have a better idea right now. The thing is, by trying to keep everything on a single page, I feel like we’re leaving out a lot of important information Also, here are some other things i would love to keep in the docs:
Lemme know your opinions |
In your frontend project, create the Tuyau client by importing the API definition: | ||
|
||
```ts | ||
import { createTuyau } from '@tuyau/client'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick. But we shouldn't have semi-colons in the code examples.
A thought. Instead of having the doc title as "Tayau Client", should we instead write the doc for "Type-safe client" or something similar? This is because, no one will look at the title |
|
||
### File uploads | ||
|
||
When a File instance is passed, Tuyau automatically converts it to a ?`FormData` instance and sets the appropriate headers. The payload is serialized using the `object-to-formdata` package, ensuring that the file is correctly formatted for transmission. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a ?
before FormData
that seems like a typo.
Also, can we link to object-to-formdata
package for easier navigation?
Yeah probably but I’m not sure if "Type-safe client" is the right fit since Tuyau does have a Type-safe RPC/E2E client part, but that’s not all. there’s also our But I don’t have a better name to suggest right now 😅 |
Hey! 👋🏻
This PR adds the documentation for the Tuyau package.
The following are still missing:
InferRequest
/InferResponse
$current
,$has
methodsAdditionally, the current Tuyau documentation includes a brief section on Next.js, which acts more like a tutorial for building a monorepo with Next.js, AdonisJS, and Tuyau for type-safe client-side development. I think this content would be better suited as an article for our blog, which we could link to from the documentation.