@api-wrappers/api-core is a shared HTTP runtime for TypeScript API wrapper
packages. These docs explain how to install the package, create clients, send
REST and GraphQL requests, add plugins, handle errors, and test wrappers without
network calls.
- Getting Started: install the package and make your first REST request.
- Examples: copy-pasteable REST, plugin, GraphQL, transport, and error-handling examples.
- REST Requests: request methods, query strings, headers, bodies, abort signals, and response metadata.
- GraphQL: typed GraphQL queries and GraphQL error handling.
- Plugins: how the plugin lifecycle works and how to write custom plugins.
- Built-In Plugins: auth, retry, timeout, rate-limit, cache, and logger plugins.
- Error Handling:
ApiError,RateLimitError,TimeoutError, andGraphQLRequestError. - Testing: custom transports and deterministic test clients.
- Client API:
BaseHttpClient,createClient,request,requestWithResponse, and convenience methods. - Configuration:
ClientConfig,RequestOptions, retry config, query params, and transport config. - Exports: complete public export list.
- Roadmap: direction, priorities, and non-goals for the shared runtime.
- Contributing: setup, validation, review expectations, and TypeScript guidelines.
- Contributing Ideas: starter issues and larger follow-up ideas.