# mizuki-urql-adapter

> A toolkit for building Tauri Plugin that enables type-safe IPC through GraphQL.

Latest version **1.1.1** (published 2026-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install mizuki-urql-adapter
pnpm add mizuki-urql-adapter
yarn add mizuki-urql-adapter
bun add mizuki-urql-adapter
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2026-05-22 |
| First published | 2023-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 540.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jonas Kruckenberg, Tony Mushah |
| Maintainers | tonymushah |
| Keywords | tauri, graphql |

## Links

- npm: https://www.npmjs.com/package/mizuki-urql-adapter
- Repository: https://github.com/tonymushah/mizuki
- Homepage: https://github.com/tonymushah/mizuki/tree/main/packages/urql
- Issues: https://github.com/tonymushah/mizuki/issues
- npm.io page: https://npm.io/package/mizuki-urql-adapter

## Dependencies (3)

- [wonka](https://npm.io/package/wonka.md) 6
- [@urql/core](https://npm.io/package/@urql/core.md) 6
- [@tauri-apps/api](https://npm.io/package/@tauri-apps/api.md) 2

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2026-05-22
- 1.1.0 — 2025-10-22
- 1.0.2 — 2025-10-08
- 1.0.1 — 2025-02-04
- 1.0.0 — 2025-01-08
- 0.1.2 — 2024-02-05
- 0.1.1 — 2024-02-05
- 0.1.0 — 2023-12-04

## README

# mizuki-urql-adapter

[![Npm][npm-badge]][npm-url]

Custom `urql` exchange that uses Tauri's IPC system to resolve queries against a GraphQL endpoint.

## Install

```console
$ pnpm add mizuki-urql-adapter
# or
$ npm install mizuki-urql-adapter
# or
$ yarn add mizuki-urql-adapter
```

## Usage

You need to register the plugin with Tauri first! Please see the [top-level Readme] for a full example.

Import and use the custom exchange to connect to the GraphQL endpoint exposed over IPC.

```javascript
import { getExchanges } from 'mizuki-urql-adapter'
import { createClient, useQuery, useSubscription } from "@urql/preact"

const client = createClient({
  url: 'graphql', // not important but needed to releive some Typescript errors
  exchanges: [...getExchanges('myPlugin')]
})

const heroQuery = `
query {
  hero {
    name
  }
}
`

function Hero() {
  const [result, reexecuteQuery] = useQuery({
    query: heroQuery
  })

  const {data, fetching, error} = result

  if (fetching) return <p>Loading...</p>
  if (error) return <p>Oh no... {error.message}</p>

  return <p>The hero is {data.hero.name}</p>
}

const newMessages = `
  subscription MessageSub {
    helloWorld
  }
`

function handleSubscription(messages = [], response) {
  return [response.helloWorld, ...messages]
}

function TestSubscription() {
  const [res] = useSubscription({query: newMessages}, handleSubscription)

  if (!res.data) {
    return <p>No new messages</p>
  }

  return <p>{res.data}</p>
}
```

## License

[MIT © Tony Mushah](./LICENSE)

[top-level Readme]: ../../README.md
[npm-url]: https://www.npmjs.com/package/mizuki-urql-adapter
[npm-badge]: https://img.shields.io/npm/v/mizuki-urql-adapter

---
_Source: https://npm.io/package/mizuki-urql-adapter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
