src/zuhyo

Types

Query = object
  query*: string
  variables*: Variables
Variables = Table[string, string]
ZuhyoClient = ref object
  url*: string

Procs

proc dumpHook(s: var string; v: Variables) {....raises: [], tags: [], forbids: [].}
proc newClient(url: string): ZuhyoClient {....raises: [], tags: [], forbids: [].}
Create a new zuhyo client
proc newQuery(body: string; v: Variables): Query {....raises: [], tags: [],
    forbids: [].}
Create a query from body using variables v
proc readQuery(filename: string; v: Variables): Query {....raises: [IOError],
    tags: [ReadIOEffect], forbids: [].}
Read a graphql query from filename and use the variables v
proc request(api: ZuhyoClient; query: Query): Response {.
    ...raises: [CatchableError, PuppyError], tags: [], forbids: [].}
Request a response from the api provided in ZuhyoClient using the query

Templates

template vars[A, B](ctx: openArray[(A, B)]): Variables
Converts a table into the Variables type