# f/graphql.js

A Simple and Isomorphic GraphQL Client for JavaScript

Repository: https://github.com/f/graphql.js
Canonical: https://ross.abutalabs.com/products/graphqljs
Language: JavaScript
License: MIT
License Family: permissive
Topics: graphql, graphql-client, relay
Last push: 2023-03-06T22:45:10+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3491, "days_push": 1276, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2261, forks 88 (observed 2026-08-28T04:06:31.773355+00:00)

## What it is
graphql.js is a lightweight (4k gzipped), dependency-free GraphQL client for JavaScript that works isomorphically in both browsers and Node.js. It provides a simple tag-based API for queries, mutations, fragments, autodeclared variables, and query merging to reduce request count.

## Use cases
- make graphql queries from the browser without react or relay
- call a graphql api from node.js with a tiny client
- merge multiple graphql queries into fewer requests
- define reusable graphql fragments in javascript
- send authenticated graphql requests with custom headers
- use graphql in projects without a heavy apollo/relay stack

## When to choose
- you need a minimal, zero-dependency graphql client
- your project doesn't use React, Relay, or Apollo
- you want isomorphic code running in both browser and Node.js
- bundle size is critical and you only need basic queries/mutations

## When to avoid
- you need caching, subscriptions, or a normalized store (use Apollo or urql)
- you rely on active development and frequent updates
- you need TypeScript types or codegen integration
- you need websocket subscriptions or persisted queries

## Facets
- artifact type: library
- maturity: maintenance
- function: graphql-client, http-client
- domain: web-development, frontend, apis, developer-tools
- platform: browser, cross-platform
- tags: graphql, isomorphic, lightweight, query-merging, fragments, no-dependencies, nodejs

## Member repositories
- f/graphql.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:31.773355+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:42:33.202812+00:00, confidence not recorded.
  - readme: https://github.com/f/graphql.js (fetched 2026-08-28T04:06:31.773355+00:00, sha e3113396f71c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
