"api" object
Last updated
Last updated
We use a , which is essentially a wrapper over , and is in terms of usage.
The frontend routes line up with our backend routes according to our . (in the comments in the second image below, you can see which backend/Rails controller actions are related to each frontend route)
"api" object (holds "router" objects)
"router" objects (hold "procedures" -- e.g. getSingle, getMany, etc.)
Queries (e.g. getSingle, getMany) (useQuery-wrapped procedures)
Mutations (e.g. create, update, delete) (useMutation-wrapped procedures)
-- Top-level resource (e.g. projects):
-- Nested resource (e.g. production goals -- projects/production_goals)