
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@cratestack/adapter-rtk
Advanced tools
An RTK Query BaseQueryFn adapter over CrateStack's generated TypeScript RPC client.
An RTK Query BaseQueryFn adapter over
CrateStack's generated TypeScript RPC client (transport rpc schemas) — dispatches every endpoint
through the same runtime and RpcLink chain (@cratestack/link-batch, @cratestack/link-logger,
etc.) the rest of the generated client uses, instead of RTK Query's default fetchBaseQuery
reimplementing the wire protocol.
This package is the primitive; cratestack generate-typescript --rtk (cratestack#906) generates a
full createApi endpoint set on top of it — src/rtk-api.ts's createCratestackRtkApi(client), one
entry per model operation and per procedure, with providesTags/invalidatesTags derived from the
schema rather than hand-written. The hand-written shape below is still exactly what that generated
code does under the hood, and is the reference for anyone customizing beyond the generator's output
or writing a --template-dir override for rtk-rpc.ts.j2.
import { createRpcBaseQuery } from "@cratestack/adapter-rtk";
import { createApi } from "@reduxjs/toolkit/query/react";
import { client } from "./generated/client"; // your project's generated client instance
export const api = createApi({
reducerPath: "api",
baseQuery: createRpcBaseQuery(client.runtime),
endpoints: (builder) => ({
getWidget: builder.query<Widget, number>({
query: (id) => ({ opId: "model.Widget.get", input: { id } }),
}),
createOrder: builder.mutation<Order, CreateOrderInput>({
query: (input) => ({ opId: "model.Order.create", input }),
}),
}),
});
createRpcBaseQuery takes an RpcCaller — any object with a call<I, O>(opId, input, options?)
method, which is exactly the shape of a generated client's public .runtime field
(CratestackRpcRuntime). A failed call surfaces as { status: "RPC_ERROR", data: RpcErrorBody }
when the server returned a structured error, or { status: "RPC_TRANSPORT_ERROR" } for a network
failure with no such body.
FAQs
An RTK Query BaseQueryFn adapter over CrateStack's generated TypeScript RPC client.
We found that @cratestack/adapter-rtk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.