A flexible GraphQL client for Elixir applications with customizable JSON and connection modules.
Neuron is a GraphQL client library for Elixir that enables developers to interact with GraphQL APIs from their Elixir applications. It handles query execution, mutations, and response parsing while providing configuration options for JSON libraries and network connections. The library solves the problem of integrating GraphQL services into Elixir projects with minimal boilerplate code.
Elixir developers building applications that need to consume GraphQL APIs, particularly those requiring customization of JSON serialization or network communication layers.
Developers choose Neuron for its balance of simplicity and extensibility—it works out-of-the-box with sensible defaults but allows deep customization of JSON handling and connection protocols. Unlike more rigid GraphQL clients, Neuron's modular design adapts to diverse project requirements.
A GraphQL client for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Defaults to Jason but allows any JSON library implementing the required behavior, enabling customization for specific serialization needs, as shown in the config example.
Supports HTTPoison by default but can be extended with custom modules, allowing adaptation to different protocols beyond HTTP, demonstrated in the connection module implementation.
Allows overriding HTTP timeouts globally or per-request, useful for handling long-running operations, with clear examples in the README for setting recv_timeout.
Returns responses in a structured Neuron.Response tuple, facilitating easy pattern matching in Elixir code, as seen in the query response format.
Lacks built-in support for GraphQL subscriptions, caching, or automatic retries, which are common in more comprehensive GraphQL clients and may require extra implementation.
Setting up custom JSON libraries or connection modules requires additional code, which can be verbose and error-prone for simple integrations compared to drop-in solutions.
The README provides basic usage but lacks in-depth examples for complex scenarios, pushing users to external hexdocs for detailed guidance, potentially slowing onboarding.