A Node.js GraphQL client that lets you write queries as JSON objects instead of strings.
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.
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.
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.
GraphQL query utility for serverside apps
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.
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.
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.
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.
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.
GotQL only handles queries and mutations, completely missing GraphQL subscriptions, a key feature for real-time applications, limiting its utility for modern GraphQL APIs.
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.