A small SuperAgent plugin that wraps a GraphQL query (string + variables) into a JSON POST body. Version 0.1.2 is the latest stable release, with no update cadence. It adds a .use() middleware that sets the request body to {query, variables} and ensures the Content-Type is application/json. Unlike full GraphQL clients, this is a minimal helper for SuperAgent users who want to fire a single query without a dedicated client.
npm install superagent-graphqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to send a GraphQL POST request using superagent-graphql plugin with query string and variables.
Consider using a modern GraphQL client or building the request manually.
Set Content-Type after .use() if you need a different type.
Run npm install superagent alongside superagent-graphql.
npm install superagent-graphql
Use `import ql from 'superagent-graphql'` or `const ql = require('superagent-graphql')`Add `import request from 'superagent'` at the top.