A GraphQL client for Clojure and ClojureScript with re-frame bindings, supporting subscriptions, queries, and mutations.
re-graph is a GraphQL client library for Clojure and ClojureScript that enables developers to interact with GraphQL APIs efficiently. It supports queries, mutations, and subscriptions over both HTTP and WebSocket transports, solving the problem of managing GraphQL communication in Clojure-based applications. The library is designed to be compatible with Apollo-style servers, providing a familiar feature set in a Clojure idiom.
Clojure and ClojureScript developers building applications that consume GraphQL APIs, especially those using the re-frame framework for state management and UI.
Developers choose re-graph for its seamless integration with re-frame, robust support for real-time subscriptions, and flexibility in handling multiple GraphQL services and authentication methods—all within a clean, functional Clojure API.
A graphql client for clojurescript and clojure
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides idiomatic re-frame events for init, subscribe, query, and mutate, making it a natural fit for re-frame applications as shown in the usage examples with ::re-graph/ events.
Supports both WebSocket and HTTP connections configurable per operation, enabling real-time subscriptions and standard queries, with options to disable either protocol as needed.
Allows simultaneous connections to multiple GraphQL services from a single app using :instance-id, as demonstrated in the multiple instances section.
Offers various methods like headers, connection init payload, cookies, and query parameters, addressing complex GraphQL auth scenarios, especially for WebSocket in browsers.
Version 0.2.0 introduced breaking changes requiring an upgrade guide, which can disrupt existing projects and increase migration effort.
Requires different setups for JDK 11+ vs earlier versions and Javascript-only targets, involving exclusions and additional libraries like re-graph.clj-http-gniazdo.
As admitted in the README, using headers for WebSocket authentication in browsers is not possible, forcing workarounds that may be less secure or convenient.
re-graph is an open-source alternative to the following products: