ContributingWeb client
Add an endpoint
The TypeScript types copy the Rust types by hand. When the API changes, update four files in order.
types.ts. The copy of the Rust types.
1 / 5
Update the types
Update src/lib/api/types.ts. This file is the mirror of dto.rs, models.rs and logs.rs in ferry-core.
Add the call
Add the call to src/lib/api/endpoints.ts. For new data in the cache, add a key to src/lib/api/keys.ts.
Add the hooks
Add or extend the query hooks and the mutation hooks in src/lib/api/queries/.
Refresh the data on a change
Some data must refresh by itself. Add its query keys to the invalidations of the correct change kind in src/lib/api/events.ts.