zuhyo
The easiest way to interact with a graphql api
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | LGPL-3.0-or-later |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:26 |
Tags
Authors
- ripples
Installation
nimble install zuhyo
choosenim install zuhyo
git clone https://github.com/arashi-software/zuhyo
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| zuhyo | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= 2.0.0", "puppy", | "jsony | No |
Source
| Repository | https://github.com/arashi-software/zuhyo |
|---|---|
| Homepage | https://github.com/arashi-software/zuhyo |
| Registry Source | nimble_official |
README
Zuhyo (図表)
The easiest way to interact with a graphql api
Features
- Fast as fuck
- No need for openssl or other ssl libraries when compiling
Installation
Zuhyo can be installed through nimble (coming soon)
nimble install zuhyo
or through git
nimble install https://github.com/arashi-software/zuhyo
Usage
GraphQL query from a file
let
api = zuhyo.newClient("https://graphql.anilist.co") # Create a new zuhyo client; Pass in the api endpoint
query = "tests/test.gql".readQuery(vars {"id": "15125"}) # Read a file to create a query and pass in variables using the vars function
req = api.request(query) # Finally request from the api using the graphql query we just created
echo req.code # Response code of the request
echo req.headers # Headers returned in the request
echo req.body # Actual json
GraphQL query from text
let
api = zuhyo.newClient("https://graphql.anilist.co") # Create a new zuhyo client; Pass in the api endpoint
query = """
query ($id: Int) { # Define which variables will be used in the query (id)
Media (id: $id, type: ANIME) { # Insert our variables into the query arguments (id) (type: ANIME is hard-coded in the query)
id
title {
romaji
english
native
}
}
}
""".newQuery(vars {"id": "15125"}) # Read a file to create a query and pass in variables using the vars function
req = api.request(query) # Finally request from the api using the graphql query we just created
echo req.code # Response code of the request
echo req.headers # Headers returned in the request
echo req.body # Actual json