graphql-lookahead
JSON →graphql-lookahead is a TypeScript library (v1.4.0) that enables GraphQL resolvers to check whether specific fields are requested in the incoming operation (query/mutation). This allows optimizing database queries by avoiding fetching nested relationships when not needed. It works with any GraphQL server and ORM. The library is actively maintained with regular releases and provides accurate field/type/hierarchy checks through a callback-based API (`until`, `next`, `nextFragment`). Key differentiators: lightweight, no magic AST parsing, typed, and supports fragment spreads. Peer dependency: graphql 16.x. ESM-only, ships TypeScript types.
Traffic · last 30 days stale · no recent hits
total hits 9
actors 3 distinct systems
last hit 16d ago AhrefsBot
top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · 🇧🇷 Brazil · 🇫🇷 France
Resources
packagegraphql-lookahead ↗
API endpoints
full doc /v1/registry/graphql-lookahead