Skip to content

feat(typescript): add createJsonApiClient with typed resource handles - #215

Merged
Erlend Ellefsen (erlendellefsen) merged 1 commit into
nextfrom
feat/typescript-core-client
Sep 2, 2026
Merged

feat(typescript): add createJsonApiClient with typed resource handles#215
Erlend Ellefsen (erlendellefsen) merged 1 commit into
nextfrom
feat/typescript-core-client

Conversation

@erlendellefsen

Copy link
Copy Markdown
Collaborator

Summary

Adds the core client. client.resource<T>(path) returns a handle with list, get, create, update, remove: query building, fetch, hydration, and error handling in one call path. Non-2xx throws JsonApiRequestError with status, errors, hasCode(), fieldErrors().

Builder fixes, hydration fixes, and the React adapter follow in separate PRs.

How to test

cd clients/typescript && deno task test
deno task test:contract   # needs both samples/ContractApi instances running

@erlendellefsen
Erlend Ellefsen (erlendellefsen) merged commit 60f8fa2 into next Sep 2, 2026
14 checks passed
@erlendellefsen
Erlend Ellefsen (erlendellefsen) deleted the feat/typescript-core-client branch September 2, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant