Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

graphqurl

$ gq Official Low Risk
Hasura · Browser & Web · Apache-2.0 · macos / linux / windows

graphqurl (hasura/graphqurl, binary gq) executes GraphQL queries, mutations, and WebSocket subscriptions from the command line (gq <url> -q '...'), supports custom headers (-H) and variables (-v), and exports remote GraphQL schemas via --introspect in SDL or --format json.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g graphqurl
CLI vs MCP Decision CLI Preferred vs MCP

gq inspects remote GraphQL schemas with --introspect and runs targeted queries returning pure JSON without wrapping a GraphQL endpoint inside an MCP server.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Native JSON GraphQL responses, --introspect --format json, and headless -q/-v/-H execution, though bare gq <url> enters interactive mode.

  • Emits JSON responses natively and supports --introspect --format json
  • Headless when -q or --introspect is provided
Trust & Safety 20 / 25

Stateless invocation with explicit headers, though GraphQL mutations require caller inspection (no --dry-run).

  • No persisted credentials; scoped -H headers per command
Setup & Portability 13 / 15

Cross-platform npm package (graphqurl / npx graphqurl) requiring Node.js.

  • Available via npm install -g graphqurl or npx graphqurl
Utility & Efficiency 12 / 15

Far cleaner than hand-escaping GraphQL JSON bodies in curl, with built-in schema introspection and subscriptions.

  • Supports queries, variables (-v), GraphiQL (--graphiql), and --introspect
Maintenance & Lineage 7 / 10

Official Hasura repository (hasura/graphqurl) under Apache-2.0, feature-complete with slow release cadence.

  • Hasura-maintained hasura/graphqurl under Apache-2.0
Docs & Verifiability 7 / 10

Clear README examples for queries, subscriptions, and introspection.

  • Structured README examples and --help reference

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Stateless; accepts auth tokens or Hasura admin secrets via -H "Authorization: ..." or -H "x-hasura-admin-secret: ...".

Side Effects
Read-Only Remote Write
Cost & Quotas

Apache-2.0 open-source Node.js CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# graphqurl (gq) Agent Rules
- Always pass `-q '...'` or `--introspect` so `gq` runs one-shot and does not enter interactive prompt mode.
- Run `gq <url> --introspect` first to verify exact field names before writing queries or mutations.
- Check whether `-q` contains a `mutation` before executing against production endpoints.

Agent-Ready Command Recipes

Safe Read-Only Queries

Introspect a remote GraphQL schema as JSON
gq https://api.example.com/graphql --introspect --format json

Fetches the GraphQL introspection schema and emits it in JSON format.

Execute a parameterized GraphQL query
gq https://api.example.com/graphql -q 'query($id: ID!) { user(id: $id) { id name } }' -v id=42

Sends a read-only GraphQL query with typed variables and prints the JSON response.

Controlled Writes & Previews

Execute a GraphQL mutation with headers
gq https://api.example.com/graphql -H "Authorization: Bearer $API_TOKEN" -q 'mutation { ... }'

Sends an authenticated GraphQL mutation and outputs the server JSON response.

Strengths for Agents

  • + gq <url> --introspect lets agents discover GraphQL schemas in SDL or JSON immediately.
  • + Ergonomic -q and -v flags avoid brittle JSON escaping compared to curl.

Caveats & Pitfalls

  • ! Running gq <url> without -q or --introspect enters an interactive auto-complete prompt.
  • ! Older Node.js codebase with infrequent upstream updates.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI