Repository Analysis

trpc/trpc

🧙‍♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.

1.7 Likely human-written View on GitHub
1.7
Adjusted Score
1.7
Raw Score
100%
Time Factor
2026-05-29
Last Push
40,277
Stars
TypeScript
Language
167,377
Lines of Code
1380
Files
99
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 17HIGH 0MEDIUM 15LOW 67

Pattern Findings

99 matches across 7 categories. Click a row to expand file-level details.

Hallucination Indicators17 hits · 175 pts
SeverityFileLineSnippet
CRITICALexamples/.test/monotest-app/src/vanilla-client.ts20 const res = await client.router01.child.grandchild.proc.query();
CRITICAL…pgrade/test/__fixtures__/hooks/withInvalidate.snap.tsx17 trpc.post.x.y.z.longPropName.pathFilter(),
CRITICAL…ges/upgrade/test/__fixtures__/hooks/withInvalidate.tsx13 utils.post.x.y.z.longPropName.invalidate();
CRITICAL…ade/test/__fixtures__/hooks/multipleFunctions.snap.tsx7 useQuery(trpc.a.b.c.d.queryOptions());
CRITICAL…ade/test/__fixtures__/hooks/multipleFunctions.snap.tsx15 useQuery(trpc.a.b.c.d.queryOptions());
CRITICALpackages/upgrade/test/__fixtures__/hooks/basic.snap.tsx7 useQuery(trpc.a.b.c.d.queryOptions());
CRITICALpackages/upgrade/test/__fixtures__/hooks/basic.tsx6 trpc.a.b.c.d.useQuery();
CRITICAL…/upgrade/test/__fixtures__/hooks/multipleFunctions.tsx5 trpc.a.b.c.d.useQuery();
CRITICAL…/upgrade/test/__fixtures__/hooks/multipleFunctions.tsx12 trpc.a.b.c.d.useQuery();
CRITICALpackages/tests/server/smoke.test.ts108 expect(await ctx.client.deeply.nested.greeting.query('KATT')).toBe(
CRITICALpackages/tests/server/smoke.test.ts132 expect(await ctx.client.deeply.nested.greeting.query('KATT')).toBe(
CRITICALpackages/tests/server/smoke.test.ts135 expect(await ctx.client.deeply.nested.router.greeting.query('KATT')).toBe(
CRITICALpackages/tests/server/children.test.ts32 expect(await ctx.client.child.grandchild.foo.query()).toBe('grandchild');
CRITICALpackages/tests/server/children.test.ts33 expect(await ctx.client.child.grandchild.mut.mutate()).toBe('mut');
CRITICAL…rc/unstable-core-do-not-import/http/resolveResponse.ts751 // - `router._def._config.transformer.output.serialize()` throws
CRITICAL…er/src/unstable-core-do-not-import/http/contentType.ts117 opts.router._def._config.transformer.input.deserialize(inputs);
CRITICAL…er/src/unstable-core-do-not-import/http/contentType.ts132 opts.router._def._config.transformer.input.deserialize(input);
Decorative Section Separators15 hits · 45 pts
SeverityFileLineSnippet
MEDIUMwww/docs/client/react/getQueryKey.md32// will match all ───────────────────────┘
MEDIUM…ersioned_docs/version-10.x/client/react/getQueryKey.md31// will match all ───────────────────────┘
MEDIUM_artifacts/domain_map.yaml57 # ── Defining the API ──────────────────────────────────────────────
MEDIUM_artifacts/domain_map.yaml636 # ── Consuming the API ─────────────────────────────────────────────
MEDIUM_artifacts/domain_map.yaml961 # ── Hosting the API ───────────────────────────────────────────────
MEDIUM_artifacts/domain_map.yaml1146 # ── Real-time ─────────────────────────────────────────────────────
MEDIUM_artifacts/domain_map.yaml1272 # ── Framework integration ─────────────────────────────────────────
MEDIUM_artifacts/domain_map.yaml1395 # ── Composition skills ────────────────────────────────────────────
MEDIUM_artifacts/skill_tree.yaml13 # ── Router skill (entry point) ────────────────────────────────────
MEDIUM_artifacts/skill_tree.yaml30 # ── Defining the API (packages/server) ────────────────────────────
MEDIUM_artifacts/skill_tree.yaml180 # ── Hosting the API (packages/server — adapters) ──────────────────
MEDIUM_artifacts/skill_tree.yaml266 # ── Consuming the API (packages/client) ───────────────────────────
MEDIUM_artifacts/skill_tree.yaml336 # ── Real-time (packages/server + packages/client) ─────────────────
MEDIUM_artifacts/skill_tree.yaml363 # ── Framework integration ─────────────────────────────────────────
MEDIUM_artifacts/skill_tree.yaml449 # ── Interop and publishing ────────────────────────────────────────
Hyper-Verbose Identifiers32 hits · 32 pts
SeverityFileLineSnippet
LOWwww/docusaurus.typedoc.js9function generateTypedocDocusaurusPlugins(directories) {
LOW…es/next-sse-chat/src/app/channels/[channelId]/hooks.ts9export function useThrottledIsTypingMutation(channelId: string) {
LOWexamples/next-sse-chat/src/server/trpc.ts51 async function artificialDelayInDevelopment(opts) {
LOW…ntent-types/client/src/SendMultipartFormDataButton.tsx3export function SendMultipartFormDataButton() {
LOWpackages/upgrade/src/transforms/hooksToOptions.ts377 function removeSuspenseDestructuring(
LOWpackages/upgrade/src/lib/ast/modifiers.ts15export function replaceMemberExpressionRootIndentifier(
LOWpackages/react-query/test/offline.test.tsx67 async function simulateMutationWithoutConnection() {
LOWpackages/react-query/test/offline.test.tsx103 async function restoreConnectionAndVerifyMutation() {
LOWpackages/react-query/test/polymorphism.test.tsx417function SubTypedStartExportButton(props: SubTypedStartExportButtonProps) {
LOWpackages/react-query/src/internals/trpcResult.ts30export async function buildQueryFromAsyncIterable(
LOWpackages/tests/server/errors.test.ts22function getMessageFromUnknownError(err: unknown, fallback: string): string {
LOWpackages/server/src/adapters/aws-lambda/getPlanner.ts47function getHeadersAndCookiesFromResponse(response: Response) {
LOW…s/server/src/unstable-core-do-not-import/middleware.ts221 async function outputValidatorMiddleware({ next }) {
LOW…server/src/unstable-core-do-not-import/stream/jsonl.ts478 function getOrCreate(chunkId: ChunkIndex) {
LOW…/unstable-core-do-not-import/http/getHTTPStatusCode.ts96export function getHTTPStatusCodeFromError(error: TRPCError) {
LOW…table-core-do-not-import/http/parseConnectionParams.ts5export function parseConnectionParamsFromUnknown(
LOW…table-core-do-not-import/http/parseConnectionParams.ts35export function parseConnectionParamsFromString(
LOWpackages/openapi/test/types.ts255export function requireEnvelopeDataSchema({
LOWpackages/openapi/test/types.ts306export function getResponseComponentSchema(
LOWpackages/openapi/test/types.ts313export function requireResponseComponentSchema(
LOWpackages/openapi/src/schemaExtraction.ts281export function collectRuntimeDescriptions(
LOWpackages/openapi/src/generate.ts274function convertPrimitiveOrLiteral(
LOWpackages/openapi/src/generate.ts422function detectDiscriminatorProperty(schemas: SchemaObject[]): string | null {
LOWpackages/openapi/src/generate.ts859function shouldIncludeProcedureInOpenAPI(type: ProcedureInfo['type']): boolean {
LOWpackages/openapi/src/generate.ts863function getProcedureInputTypeName(type: ts.Type, path: string): string {
LOWpackages/openapi/src/generate.ts903function isCollapsedProcedureInputType(type: ts.Type): boolean {
LOWpackages/openapi/src/generate.ts912function recoverProcedureInputType(
LOWpackages/openapi/src/heyapi/index.ts52export function createTRPCHeyApiTypeResolvers(): HeyAPIResolvers {
LOWpackages/openapi/src/heyapi/index.ts72export function createTRPCHeyApiClientConfig(opts?: TRPCHeyApiClientOptions) {
LOWpackages/openapi/src/heyapi/index.ts121export function createTRPCErrorInterceptor(
LOWpackages/openapi/src/heyapi/index.ts154export function configureTRPCHeyApiClient(
LOWpackages/client/src/TRPCClientError.ts37function getMessageFromUnknownError(err: unknown, fallback: string): string {
Over-Commented Block24 hits · 24 pts
SeverityFileLineSnippet
LOWwww/og-image/next-env.d.ts1/// <reference types="next" />
LOWwww/og-image/pages/api/landing.tsx21 const data = await (
LOWexamples/next-edge-runtime/next-env.d.ts1/// <reference types="next" />
LOWexamples/next-formdata/next-env.d.ts1/// <reference types="next" />
LOWexamples/.test/ssg/next-env.d.ts1/// <reference types="next" />
LOWexamples/.test/diagnostics-big-router/next-env.d.ts1/// <reference types="next" />
LOWexamples/.test/ssg-infinite-serialization/next-env.d.ts1/// <reference types="next" />
LOWexamples/next-prisma-websockets-starter/next-env.d.ts1/// <reference types="next" />
LOW…bsockets-starter/.github/workflows/codeql-analysis.yml1# For most projects, this workflow file will not need changing; you simply need
LOW…les/next-prisma-websockets-starter/src/pages/index.tsx321// ctx: await createContext(),
LOWexamples/next-websockets-encoder/next-env.d.ts1/// <reference types="next" />
LOWexamples/next-prisma-starter/next-env.d.ts1/// <reference types="next" />
LOWexamples/next-prisma-starter/src/pages/index.tsx161
LOWexamples/next-prisma-starter/src/pages/index.tsx181// trpcState: ssg.dehydrate(),
LOWexamples/next-big-router/next-env.d.ts1/// <reference types="next" />
LOWexamples/next-minimal-starter/next-env.d.ts1/// <reference types="next" />
LOWexamples/.experimental/next-app-dir/test/client.test.ts21
LOWpackages/react-query/src/createTRPCReact.tsx141// TQueryFnData,
LOWpackages/react-query/src/createTRPCReact.tsx161// TQueryKey,
LOWpackages/react-query/src/createTRPCReact.tsx241 // TPageParam
LOW…ages/react-query/src/shared/polymorphism/routerLike.ts41// TRoot extends AnyRootTypes,
LOW…kages/react-query/src/shared/hooks/createRootHooks.tsx1// NOTE: This indirection is only needed to break a circular-reference.
LOW.github/workflows/codeql-analysis.yml1# For most projects, this workflow file will not need changing; you simply need
LOW.github/workflows/notify-intent.yml1# notify-intent.yml — Drop this into your library repo's .github/workflows/
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippet
LOWwww/og-image/pages/index.tsx70 'The createContext() function is called for each request, and the result is propagated to all resolvers.
LOWwww/og-image/pages/index.tsx70 'The createContext() function is called for each request, and the result is propagated to all resolvers.
LOWwww/docs/server/context.md143 const user = token ? { email: 'user@example.com' } : null;
LOWwww/docs/client/react/useMutation.md77 const name = 'John Doe';
LOWwww/docs/client/react/disabling-queries.md21 return { name: input.name, email: 'user@example.com' };
LOWwww/versioned_docs/version-9.x/reactjs/useMutation.md53 const name = 'John Doe';
LOW…ersioned_docs/version-10.x/client/react/useMutation.md57 const name = 'John Doe';
LOW…ntent-types/client/src/SendMultipartFormDataButton.tsx11 fd.set('name', 'John Doe');
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippet
LOW.github/workflows/check-skills.yml47 # Check if any skills need review
LOW.github/workflows/semantic-pr.yml74 # Check if scope is in allowed list
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOWpackages/server/src/adapters/ws.ts207 function handleRequest(msg: TRPCClientOutgoingMessage, batchIndex: number) {