惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
PCI Perspectives
PCI Perspectives
H
Help Net Security
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
S
Secure Thoughts
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
大猫的无限游戏
大猫的无限游戏
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Security @ Cisco Blogs
阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
T
Tor Project blog
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
博客园 - 【当耐特】
G
Google Developers Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
I
Intezer
S
Schneier on Security
S
Securelist
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
P
Palo Alto Networks Blog
Scott Helme
Scott Helme
Project Zero
Project Zero
Google Online Security Blog
Google Online Security Blog
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
Last Week in AI
Last Week in AI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
A
Arctic Wolf
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
I got tired of Apollo Angular bugs and built my own GraphQL client
Programmed Sevenfold · 2026-06-29 · via DEV Community

For the past year, I've been building Angular applications that talk to GraphQL backends. And for the past year, I've been fighting Apollo Angular.

Not fighting GraphQL. GraphQL itself is great. But every client available for Angular is either a React port with Angular bolted on, React-only entirely, or so opinionated it forces you to restructure your backend.

So I built my own. It's called DumbQL. This is the story of why, and what I learned.


The Problem with Existing Solutions

Let me be concrete about what I mean by "fighting Apollo Angular."

Apollo Angular: A React Client Wearing Angular Clothes

Apollo Angular is a wrapper around @apollo/client, which is fundamentally a React library. This creates a cascading set of problems:

  • Angular version always lags React. When @apollo/client v4.0 dropped, Apollo Angular stayed stuck on v3 compatibility. Issue #2371 captures this — it sat open for months with a maintainer comment essentially saying "I'll get to it eventually."
  • react is a dependency even in non-React projects. Install Apollo Angular, look at your node_modules — React is there. Always. Because @apollo/client has it as a peer dependency. Issue #8958.
  • Signals? Forget it. Angular 17+ made signals the core reactive primitive. Apollo Angular has no native signals support. You're on your own to bridge the gap.

The Cache Problem

Apollo's normalized cache is powerful. It's also a source of endless pain.

Every type in your schema needs typePolicies. Every mutation needs a manual update or refetchQueries. Forget one, and you have stale UI in production.

// Apollo: you write this for every type, forever
new InMemoryCache({
  typePolicies: {
    User: { keyFields: ['id'] },
    Post: { keyFields: ['id'] },
    Comment: { keyFields: ['id'] },
    // ... and so on
  }
})

And even when you set it up correctly, there are production bugs that have been open for years:

  • #9319INVALIDATE in cache.modify silently does nothing. Stale data persists with no refetch.
  • #10289cache.evict no-ops inside optimistic UI. Open since 2022.
  • #9735 — Internal results cache merges stale data into readFromStore in production only.

URQL: Doesn't Support Angular

URQL is actually well-architected. The exchange model is clean. But it's React-only. There's no Angular binding and no plans for one.

Relay: Great if Your Backend Speaks Relay

Relay is the most opinionated of the three. It requires your backend to implement the Node interface, the Connection spec for pagination, and a compiler build step. If you're not building a Meta-style architecture from scratch, Relay is off the table.

And it's React-only anyway.


So I Started with HttpClient

I wasn't planning to build a GraphQL client. I was planning to build a frontend.

I started with Angular's built-in HttpClient to make GraphQL requests. It's actually fine for basic usage:

this.http.post<{ data: { getUser: User } }>('/graphql', {
  query: `{ getUser { id name email } }`
}).pipe(map(r => r.data.getUser))

But then I needed caching. Then auth token refresh. Then file uploads. Then I wanted proper TypeScript types for my queries. Then I wanted DevTools to inspect what was happening.

Each one I added myself. And at some point I realized I had a GraphQL client.


What DumbQL Is

DumbQL is a modular GraphQL client suite built Angular-native from day one. The core is built on HttpClient. Everything else is opt-in.

Too dumb to be complex. Too smart to repeat the same mistakes.

The Core Philosophy: Opt-In Everything

@dumbql/core          ~10KB   — the minimum viable GraphQL client
@dumbql/cache         ~3KB    — normalized cache, only if you want it
@dumbql/middlewares   ~3KB    — auth refresh, retry, offline queue
@dumbql/subscriptions ~2KB    — WebSocket via graphql-transport-ws
@dumbql/pagination    ~2KB    — cursor + offset helpers
@dumbql/file-upload   ~1KB    — multipart uploads
@dumbql/ssr           ~1KB    — TransferState for Angular Universal
@dumbql/testing       ~1KB    — mock backend for unit tests
@dumbql/debugging     ~2KB    — operation recording + DevTools
@dumbql/codegen       —       — TypeScript types from your schema
@dumbql/downloader    ~1KB    — schema introspection CLI
@dumbql/fragments     ~1KB    — type-safe fragment utilities
@dumbql/persisted-queries ~1KB — APQ with SHA-256

You don't pay for what you don't use. Every package is sideEffects: false. If you only need @dumbql/core, that's all that's in your bundle.

Setup

// app.config.ts
import { provideDumbql } from '@dumbql/core';
import { provideHttpClient } from '@angular/common/http';

export const appConfig = {
  providers: [
    provideHttpClient(),
    provideDumbql({
      endpoint: 'http://localhost:4000/graphql',
    }),
  ],
};

That's it. No cache configuration. No link chain. No provider tree.

Usage

import { Component, inject } from '@angular/core';
import { GraphqlService, gql } from '@dumbql/core';
import { map } from 'rxjs';

const GET_USER = gql`{ getUser { id name email } }`;

@Component({
  standalone: true,
  template: `<div>{{ (user$ | async)?.name }}</div>`,
})
export class UserComponent {
  private gql = inject(GraphqlService);

  user$ = this.gql.query(GET_USER).pipe(
    map(r => r.status === 'success' ? r.data.getUser : null),
  );
}


The Cache Problem, Solved

The Apollo cache requires typePolicies for every type. DumbQL's cache requires nothing.

// DumbQL: this is the entire cache configuration
provideDumbql({
  endpoint: '/graphql',
  cache: { enabled: true }
})

Under the hood, @dumbql/cache uses __typename + id (or _id) auto-detection to normalize entities. Every response is walked recursively. Entities are extracted and stored keyed by __typename:id. Mutations automatically evict related cache keys.

No cache.modify. No refetchQueries. No stale UI.

If you need advanced behavior, typePolicies are available — but you don't start there.

cache: {
  enabled: true,
  typePolicies: {
    PaginatedResult: { merge: 'append' }, // only when you need it
  }
}


Middlewares: Everything Apollo Needs Third-Party Packages For

Apollo needs external packages for auth refresh, file uploads, persisted queries, and offline support. DumbQL ships all of these as first-party @dumbql/* packages with a unified config.

Auth Token Refresh

provideDumbql({
  endpoint: '/graphql',
  middlewares: {
    authRefresh: {
      enabled: true,
      refreshEndpoint: '/auth/refresh',
      triggerStatuses: [401],
      headerName: 'Authorization',
    }
  }
})

Requests that arrive during a token refresh are queued and replayed automatically.

Offline Queue

provideDumbql({
  endpoint: '/graphql',
  middlewares: {
    offlineQueue: {
      enabled: true,
      maxQueueSize: 50,
      persistQueue: true, // survives page reload
    }
  }
})

Mutations made while offline are queued in localStorage and replayed on reconnect.

Retry with Exponential Backoff

provideDumbql({
  endpoint: '/graphql',
  retryCount: 3,
  retryDelay: 1000, // 1s, 2s, 4s...
})


Angular-Native Features

Signals

DumbQL works with Angular signals out of the box since it's built on HttpClient and RxJS — the same primitives Angular's signal APIs interop with.

Router Integration

// Guarded routes that wait for GraphQL data
export const routes: Routes = [
  {
    path: 'profile',
    ...guardedRoute(GET_USER, {
      redirect: '/login',
      check: r => r.status === 'success' && !!r.data.getCurrentUser,
    }),
    component: ProfileComponent,
  }
];

Angular Pipes

<!-- Extract data or null on error -->
<div>{{ result | graphqlData | json }}</div>

<!-- Extract error string or null on success -->
<div *ngIf="result | graphqlError as err">{{ err }}</div>

ng add Schematics

ng add @dumbql/core

Interactive prompts generate a typed dumbql.config.ts for your project.


Type Safety

DumbQL ships TypedDocumentNode<TResult, TVars> with phantom types, so your query results are fully typed without a build step.

You can also use @dumbql/codegen to generate TypeScript interfaces directly from your GraphQL schema:

npm run schema:download  # introspection → schema.json + schema.graphql
npm run codegen          # schema → TypeScript interfaces

// graphql/types/index.ts (generated)
export interface User { id: string; username: string; email: string; }
export interface Query { getCurrentUser: User; getUsers: User[]; }


Error Handling

Apollo's errorPolicy has a type-narrowing problem — data can be undefined even on success. DumbQL uses a discriminated union:

service.query<{ user: User }>(GET_USER).subscribe(result => {
  if (result.status === 'success') {
    // result.data is User — fully typed, never undefined
    console.log(result.data.user);
  } else {
    // result.error is string
    console.error(result.error);
  }
});

Helper functions available: isSuccess, isError, unwrap, unwrapOrThrow, mapResult.


DevTools

DumbQL ships a browser extension for Chrome and Firefox. It connects to devtoolsMiddleware and shows:

  • Real-time request log with timing
  • Schema visualization (SDL tree)
  • Field tree inspector per query
  • Entity cache browser
  • Mutation timing charts
provideDumbql({
  endpoint: '/graphql',
  devtools: { autoConnect: true, maxRequests: 500 }
})


Testing

import { MockGraphqlService, provideDumbqlTesting } from '@dumbql/testing';

TestBed.configureTestingModule({
  providers: [
    provideHttpClientTesting(),
    provideDumbqlTesting(),
  ],
});

const mock = TestBed.inject(MockGraphqlService);
mock.when(GET_USER, {
  status: 'success',
  data: { user: { id: '1', name: 'Test' } }
});

Simple when(query, result) API. FIFO queue. Optional simulated network delay.


Bugs Fixed from Other Clients

These are real GitHub issues that DumbQL addresses by design:

Project Issue Problem
Apollo #9319 INVALIDATE silently no-ops — stale data persists
Apollo #10289 cache.evict no-ops inside optimistic UI (open since 2022)
Apollo #11804 Skipped query ignores clearStore() — returns outdated data
Apollo #9735 Production-only: internal cache merges stale data
Apollo #8958 react required as dependency in non-React projects
Apollo Angular #2371 Angular version lags React — incompatible with @apollo/client v4
URQL #2414 relayPagination shows stale data when non-relay params change
URQL #668 Query doesn't refetch when variables change
URQL #3877 Pages concatenate in write order — flickering mis-ordered items
Relay #3406 React-only — no Angular, Vue, or Svelte support
Relay #183 Forces Node interface + Connection spec on your backend

What's Next

DumbQL started Angular-native. But the core is framework-agnostic — @dumbql/core has zero framework dependencies.

React and Vue bindings are in progress. The plan is the same opt-in model: @dumbql/react and @dumbql/vue as thin adapter layers over the same middleware pipeline and cache.

The goal isn't to replace Apollo everywhere. The goal is to give Angular developers a first-class GraphQL client that wasn't designed for a different framework first.


Try It

npm install @dumbql/core

Or with schematics:

ng add @dumbql/core

GitHub: https://github.com/DumbGQL/dumbql

Full comparison table, architecture diagram, and configuration reference in the README.


DumbQL is MIT licensed and actively developed. Issues and PRs welcome.