Protocol Specific Extensions
REST / CRUD
yarn add @rest-hooks/rest
Resource
// make this a table
Readonly endpoints
- Resource.detail()
- Resource.list()
Mutation endpoints
- Resource.create()
- Resource.update()
- Resource.partialUpdate()
- Resource.delete()
GraphQL
class GQLEntity extends Entity {
readonly id: number = 0;
pk() { return `${this.id}`; }
}
const GQL = new Endpoint(
()
)