Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Node.js
  3. gotql

gotql

MITTypeScriptv2.2.0

A Node.js GraphQL client that lets you write queries as JSON objects instead of strings.

GitHubGitHub
409 stars20 forks0 contributors

What is gotql?

GotQL is a Node.js library that serves as a GraphQL client for server-side applications. It allows developers to write GraphQL queries and mutations as JSON objects rather than strings, simplifying query construction and manipulation. It wraps the Got HTTP client to execute these queries against GraphQL endpoints.

Target Audience

Node.js developers building server-side applications that need to interact with GraphQL APIs, especially those who find string-based GraphQL query construction tedious or error-prone.

Value Proposition

Developers choose GotQL because it eliminates the pain of string manipulation for GraphQL queries, offering a more programmatic, readable, and maintainable way to build and execute queries using familiar JavaScript objects.

Overview

GraphQL query utility for serverside apps

Use Cases

Best For

  • Building server-side Node.js applications that consume GraphQL APIs
  • Programmatically generating dynamic GraphQL queries without string concatenation
  • Improving code readability and maintainability in GraphQL-heavy projects
  • Integrating GraphQL APIs with custom HTTP client configurations
  • Developing tools or scripts that need to construct and run GraphQL queries
  • Teams wanting a more structured approach to GraphQL query building

Not Ideal For

  • Client-side web or mobile applications, as GotQL is designed for server-side Node.js environments only.
  • Projects requiring GraphQL subscriptions for real-time data, since GotQL only supports queries and mutations.
  • Teams heavily invested in string-based GraphQL tooling, such as code generators or IDE plugins that expect raw query strings.
  • Applications needing extensive use of GraphQL fragments, as support is currently in alpha and not thoroughly tested per the README.

Pros & Cons

Pros

JSON-Based Query Building

Allows developers to construct GraphQL queries as JavaScript objects instead of strings, reducing manipulation errors and improving readability, as demonstrated in the motivation example comparing a complex string mutation to a clean JSON object.

Integrated HTTP Client

Leverages the robust Got library under the hood, providing configurable HTTP options like headers, HTTP/2 support, and custom instances for reliable server-side requests.

Enum and Variable Support

Includes a `literal` helper for handling GraphQL enums without escaping, and straightforward variable definition to avoid common pitfalls, as shown in examples with enum args and variable declarations.

Debugging and Customization

Supports debug levels via the `debug` package and allows customization of error status codes, headers, and HTTP settings through the options object, enhancing developer control.

Cons

Immature Fragment Support

The README explicitly states that fragment support is in an 'alpha state' and not as tested or polished as desired, which could lead to instability or missing features in production use.

No Subscription Support

GotQL only handles queries and mutations, completely missing GraphQL subscriptions, a key feature for real-time applications, limiting its utility for modern GraphQL APIs.

Server-Side Only

Designed specifically for Node.js server environments and relies on the Got HTTP client, making it unsuitable for client-side JavaScript or browser-based projects, as noted in the GitHub description.

Frequently Asked Questions

Quick Stats

Stars409
Forks20
Contributors0
Open Issues1
Last commit1 year ago
CreatedSince 2017

Tags

#hacktoberfest#query-builder#server-side#graphql#http#graphql-endpoint#nodejs#api-client#javascript#graphql-client#http-client

Built With

g
got
N
Node.js

Included in

Node.js65.5k
Auto-fetched 4 hours ago

Related Projects

axiosaxios

Promise based HTTP client for the browser and node.js

Stars109,144
Forks11,777
Last commit1 day ago
superagentsuperagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.

Stars16,652
Forks1,323
Last commit6 months ago
gotgot

🌐 Human-friendly and powerful HTTP request library for Node.js

Stars14,927
Forks992
Last commit6 days ago
node-fetchnode-fetch

A light-weight module that brings the Fetch API to Node.js

Stars8,858
Forks1,060
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub