frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Online age-verification in U.S. for child safety, but adults being surveilled

https://www.cnbc.com/2026/03/08/social-media-child-safety-internet-ai-surveillance.html
1•1vuio0pswjnm7•1m ago•0 comments

Anthropic sues Trump admin over supply-chain risk label

https://www.politico.com/news/2026/03/09/anthropic-sues-trump-admin-over-supply-chain-risk-label-...
2•johnny313•1m ago•0 comments

Show HN: Llmpm – NPM for LLMs

https://www.llmpm.co/
1•sarthaksaxena•1m ago•0 comments

Trump's Canada Trade War Hits Jack Daniel's and Jim Beam with 'Devastating' Loss

https://www.inc.com/leila-sheridan/trumps-canada-trade-war-hits-jack-daniels-and-jim-beam-with-a-...
1•dj_rock•1m ago•0 comments

Following AI generated reviews, Resident Evil AI guide books flood Amazon

https://frvr.com/blog/following-ai-generated-reviews-resident-evil-requiem-ai-guide-books-flood-a...
1•jsheard•1m ago•0 comments

2026 F1 Cars Are Shorter but Still Longer Than a Chevy Tahoe

https://www.thedrive.com/news/2026-f1-cars-are-shorter-but-still-longer-than-a-chevy-tahoe
1•PaulHoule•1m ago•0 comments

Muon on Graph Neural Networks

https://brunoalano.com/writing/muon-optimizer-gnns/
1•brunoalano•2m ago•1 comments

ZeniMax Files Trademark for Quake

https://trademarks.justia.com/996/80/quake-99680430.html
1•speckx•2m ago•0 comments

Why Are Viral Capsids Icosahedral?

https://press.asimov.com/articles/viral-capsids
1•mailyk•2m ago•0 comments

How to Recalculate a Spreadsheet (2020)

https://lord.io/spreadsheets/
1•azhenley•2m ago•0 comments

How do you track and optimize your AI API spend?

1•CostsentryAI•3m ago•0 comments

Show HN: Zenòdot – Find if a book has been translated into your language

https://www.zenodot.app/
1•AusiasTsel•5m ago•1 comments

NutriAI – AI nutrition and fitness planner

https://nutriai.si/
1•domaisi•6m ago•1 comments

Just Move to Europe

https://justmovetoeurope.com/
2•FinnKuhn•6m ago•0 comments

AI-powered I Ching oracle for reflective decision-making

https://oracle-answer-engine.lovable.app/
1•snowmei•7m ago•1 comments

AMD VP uses AI to create Radeon Linux userland driver in Python

https://www.tomshardware.com/pc-components/gpu-drivers/amd-vp-uses-ai-to-create-radeon-linux-user...
1•robtherobber•8m ago•0 comments

Why London Could Become "Agent Capital"

https://agent.capital
1•burnedchris•10m ago•0 comments

MediaVault: Secure Call Recording Storage for Contact Centers

https://www.mediavaultplus.com
1•janandonly•10m ago•0 comments

eBay – What's Ending Soon?

https://falkus.co/2026/03/ebay-bargains
1•speckx•10m ago•0 comments

Datahäxan

https://0dd.company/galleries/witches/7.html
2•akkartik•11m ago•0 comments

Show HN: League Donation – Comprehensive Fantasy Baseball Analytics Dashboard

https://leaguedonation.com/
1•iDrinan•12m ago•0 comments

Show HN: Robotics runtime in the browser (flight controller, WebAssembly)

https://cdn.copper-robotics.com/demo/flight-controller/index.html
3•gbin•13m ago•1 comments

Show HN: Connect your research data easily to AI agents

https://myluca.ai:443/
1•hgarud•13m ago•0 comments

First Cybercab Rolls Off Line: Musk Says YouTuber Will Have to Shave His Head

https://stocktwits.com/news-articles/markets/equity/tesla-first-cybercab-rolls-off-production-lin...
1•RickJWagner•14m ago•0 comments

Challenging your brain helps keep it healthy

https://apnews.com/article/brain-games-dementia-alzheimers-cognition-e4ceb3b4dda84977083d1fc9fbb2...
2•rawgabbit•15m ago•0 comments

Kuwaiti F/A-18's Triple Friendly Fire Shootdown Gets Stranger by the Day

https://www.twz.com/air/kuwaiti-f-a-18s-triple-friendly-fire-shootdown-gets-stranger-by-the-day
2•throwawayffffas•15m ago•0 comments

Show HN: A 2000s-style web forum where AI agents and humans hang out

https://www.deadinternet.forum/
1•treadon•15m ago•0 comments

Show HN: Merchpath – Curated swag platform for startups

https://www.merchpath.co
1•ivantrepreneur•15m ago•0 comments

Show HN: Styx, Open-source AI gateway with intelligent auto-routing (MCP-native)

https://github.com/timmx7/styx
1•timmx7•15m ago•0 comments

Show HN: Locode, a local first CLI that routes tasks to local LLMs or Claude

https://github.com/chocks/locode
2•chocks•16m ago•0 comments
Open in hackernews

Show HN: LazyQL: Only compute the GraphQL fields requested (TypeScript)

https://github.com/matutetandil/lazyql
1•matutetandil•2h ago
Hey HN, I built LazyQL, a small TypeScript library, because I was tired of GraphQL resolvers doing unnecessary work.

The problem: In a typical GraphQL API, your resolver computes all fields for an object, even if the client only asked for 2 out of 15. This means unnecessary database calls, API requests, and CPU time — all thrown away.

The solution: LazyQL uses JavaScript Proxy to intercept field access. You write a class with getter methods (getStatus(), getCustomerEmail(), etc.), and LazyQL ensures each getter only runs when GraphQL actually reads that field.

  @LazyQL(OrderDTO)
  class Order {
    constructor(private id: number, private db: Database) {}

    getEntityId() { return this.id; }
    getStatus() { return this.db.getOrderStatus(this.id); }
    async getCustomerEmail() { return this.db.getCustomerEmail(this.id); }
    async getShippingAddress() { return this.db.getShippingAddress(this.id); }
  }

  // Query { entity_id, status } → only getEntityId() and getStatus() run
  // getCustomerEmail() and getShippingAddress() never execute
In my benchmarks, a query requesting 3 out of 10 fields made 6 calls instead of 35 with the traditional approach.

Key design decisions: - Works transparently with Apollo, Mercurius, or any GraphQL server — they don't know LazyQL exists - Naming convention maps snake_case DTO fields to getCamelCase methods automatically - @Shared() decorator caches expensive operations that multiple getters depend on - Validates at startup that all required DTO fields have matching getters (fail fast) - Zero runtime dependencies beyond reflect-metadata

It's been running in production for a few weeks now with zero issues. The whole point was to build something invisible — it sits there, does its job, and doesn't interfere with anything.

~400 lines of code, MIT licensed. Would love to hear your thoughts.

Comments

phryneas•1h ago
Isn't that equal to just returning `{ typename: "MyTypeName", id: 123 }` from a resolver and then `graphql-js` just running the field resolvers on the `MyTypeName` type as needed?

Or is this doing more?

matutetandil•1h ago
You're right that the core idea is the same — field resolvers in graphql-js already give you lazy resolution per field. LazyQL doesn't reinvent that mechanism; it sits on top of it.

The difference is developer experience:

With plain field resolvers, you'd write something like:

  // Scattered across your resolver map
  MyTypeName: {
    status: (parent) => db.getOrderStatus(parent.id),
    customer_email: (parent) => db.getCustomerEmail(parent.id),
    shipping_address: (parent) => db.getShippingAddress(parent.id),
    // ...15 more fields
  }

  With LazyQL, everything lives in a single class with shared state:

  @LazyQL(OrderDTO)
  class Order {
    constructor(private id: number, private db: Database) {}

    getStatus() { return this.db.getOrderStatus(this.id); }

    getGrandTotal() {
      return this.getOrderDetails().grand_total;
    }

    getCurrencyCode() {
      return this.getOrderDetails().currency_code;
    }

    @Shared()
    getOrderDetails() {
      // Called by two getters, but executes only once
      return this.db.getFullOrder(this.id);
    }
  }
The main wins: @Shared() caching across getters, startup validation (missing a getter = immediate error, not a silent null at runtime), and keeping all the logic for a type in one place instead of scattered field resolvers.

So it's not doing something fundamentally different — it's a pattern for organizing it better.