README
api (OperationClassification cjs)
Operation that makes the typerepo API exposable on the frontend in a completely typesafe way.
This object contains a react-query useQuery
hook for every api function
This object contains an api function for every function in the backend
NB: only use this if you can access localStorage of the browser or the app. This means this won't work in node or in getStaticProps functions or so
gets an api url for a context get api
returns something like [apiUrl]/[apiFunctionName][queryString]
Input | ||
---|---|---|
apiUrl (optional) | string | |
Output | string |
This object contains a api function for every function in the backend
The difference from api is that it allows you to also insert custom api configurations
gets an api url for a context get api
returns something like [apiUrl]/[apiFunctionName][queryString]
Show internal (4)
Used for calling the actual api for a function with some config
NB: this is not a typed function as we are just overwriting it so we don't need any inference on this
Input | ||
---|---|---|
fnName | string | |
Output |
Used for calling the actual api for a function with some config
NB: this is not a typed function as we are just overwriting it so we don't need any inference on this
README
api (OperationClassification cjs)
Operation that makes the typerepo API exposable on the frontend in a completely typesafe way.
This object contains a react-query useQuery
hook for every api function
This object contains an api function for every function in the backend
NB: only use this if you can access localStorage of the browser or the app. This means this won't work in node or in getStaticProps functions or so
gets an api url for a context get api
returns something like [apiUrl]/[apiFunctionName][queryString]
Input | ||
---|---|---|
apiUrl (optional) | string | |
Output | string |
This object contains a api function for every function in the backend
The difference from api is that it allows you to also insert custom api configurations
gets an api url for a context get api
returns something like [apiUrl]/[apiFunctionName][queryString]
Show internal (4)
Used for calling the actual api for a function with some config
NB: this is not a typed function as we are just overwriting it so we don't need any inference on this
Input | ||
---|---|---|
fnName | string | |
Output |
Used for calling the actual api for a function with some config
NB: this is not a typed function as we are just overwriting it so we don't need any inference on this