Supertest GraphQL Extension
JSON →supertest-graphql extends the popular `supertest` library to provide a streamlined API for testing GraphQL endpoints. It is currently at version 1.1.4 and appears to be in maintenance mode, with minor bug fixes and dependency updates being the primary release activity. The library simplifies sending GraphQL queries, mutations, and even subscriptions over WebSockets, abstracting away the HTTP/WebSocket request details. Key differentiators include its direct integration with `supertest`'s familiar chaining API for assertions and request configuration, explicit methods for queries (`.query()`) and mutations (`.mutate()`), and specific helpers like `.expectNoErrors()` for GraphQL error validation. It also offers dedicated support for testing GraphQL subscriptions via WebSockets, making it a comprehensive tool for end-to-end GraphQL API testing, particularly within a Node.js testing environment like Jest.
Traffic · last 30 days ↓29% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France