gqlextractor

Extract GraphQL operations and field paths from JavaScript sources and introspection endpoints.

24|2|Updated Nov 11, 2024
One-click install
npx skills add https://github.com/pdstat/graphqlextractor --skill gqlextractor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gqlextractor
Source: https://github.com/pdstat/graphqlextractor/tree/main
Command: npx skills add https://github.com/pdstat/graphqlextractor --skill gqlextractor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GraphQL documents are often embedded inside JavaScript code and need runtime-friendly tooling to extract queries, mutations, and field paths without running the application or manually parsing files.

Core Features & Use Cases

  • Parses GraphQL documents from template literals, string literals, escaped JSON GraphQL strings, and JavaScript object literals.
  • Fetches and parses GraphQL schemas via introspection endpoints to map field paths and operations.
  • Produces outputs for operations, requests, field names, and field paths to support analysis, testing, and vulnerability assessments.

Quick Start

Run gqlextractor against your JavaScript sources and a GraphQL introspection endpoint to extract operations, requests, and field paths.

Frequently Asked Questions about gqlextractor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract GraphQL queries from JavaScript source files?

You can extract GraphQL queries from JavaScript sources by parsing template literals, string literals, and object literals to pull operations, requests, and field paths without executing the application code.

Can I fetch and parse a GraphQL schema from an introspection endpoint?

Yes, you can fetch and parse GraphQL schemas via remote introspection endpoints to map available field paths and operations for analysis and vulnerability testing.

What JavaScript formats contain embedded GraphQL documents that need extraction?

Embedded GraphQL documents are typically found in template literals, string literals, escaped JSON documents, and JavaScript object literals within source code files.

How do I find GraphQL field paths for vulnerability testing and data discovery?

You can discover GraphQL field paths by extracting operations and requests from local JavaScript files or mapping them directly from a fetched introspection schema endpoint.

Does extracting GraphQL operations from code require running the application?

No, extracting GraphQL operations from code does not require running the application; static parsing of JavaScript sources and schema introspection endpoints handles discovery independently.

Are extracted GraphQL operations useful for code review processes?

Yes, extracted GraphQL operations, requests, and field paths are directly applicable to code review, vulnerability testing, and data discovery workflows across local and remote sources.