Skip to content

Commit ecc7fde

Browse files
authored
Merge pull request #1 from tonymushah/Repo-Setup
Repo Setup
2 parents 722fba5 + 44453b2 commit ecc7fde

33 files changed

+340
-484
lines changed

.changes/config.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"gitSiteUrl": "https://github.com/your-org/tauri-plugin-graphql/",
2+
"gitSiteUrl": "https://github.com/tonymushah/mizuki",
33
"pkgManagers": {
44
"rust": {
55
"version": true,
@@ -65,14 +65,14 @@
6565
}
6666
},
6767
"packages": {
68-
"tauri-plugin-graphql": {
68+
"mizuki": {
6969
"path": ".",
7070
"manager": "rust"
7171
},
72-
"tauri-plugin-graphql-urql": {
72+
"@mizuki/urql": {
7373
"path": "packages/urql",
7474
"manager": "javascript",
75-
"dependencies": ["tauri-plugin-graphql"]
75+
"dependencies": ["mizuki"]
7676
}
7777
}
78-
}
78+
}

.changes/readme.md

-16
This file was deleted.

.github/FUNDING.yml

-5
This file was deleted.

.github/workflows/audit-javascript.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
${{ runner.os }}-
3838
- uses: actions/setup-node@v3
3939
with:
40-
node-version: '14'
40+
node-version: '18'
4141
- uses: pnpm/action-setup@v2.2.4
4242
with:
4343
run_install: true

.github/workflows/covector-status.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
runs-on: ubuntu-latest
77

88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
with:
1111
fetch-depth: 0
12-
- uses: actions/setup-node@v3
12+
- uses: actions/setup-node@v4
1313
with:
14-
node-version: '14'
14+
node-version: '18'
1515
- uses: pnpm/action-setup@v2.2.4
1616
with:
1717
run_install: true

.github/workflows/covector-version-or-publish.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
1616
- uses: actions-rs/toolchain@v1
@@ -25,9 +25,9 @@ jobs:
2525
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
2626
restore-keys: |
2727
${{ runner.os }}-
28-
- uses: actions/setup-node@v3
28+
- uses: actions/setup-node@v4
2929
with:
30-
node-version: '14'
30+
node-version: '18'
3131
- uses: pnpm/action-setup@v2.2.4
3232
with:
3333
run_install: true

.github/workflows/format-javascript.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222
audit-js:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- name: Cache pnpm modules
2727
uses: actions/cache@v3
2828
with:
2929
path: ~/.pnpm-store
3030
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
3131
restore-keys: |
3232
${{ runner.os }}-
33-
- uses: actions/setup-node@v3
33+
- uses: actions/setup-node@v4
3434
with:
35-
node-version: '14'
35+
node-version: '18'
3636
- uses: pnpm/action-setup@v2.2.4
3737
with:
3838
run_install: true

.github/workflows/format-rust.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
fail-fast: false
2222

2323
steps:
24-
- uses: actions/checkout@v3
25-
- name: Install rustfmt with nightly toolchain
24+
- uses: actions/checkout@v4
25+
- name: Install rustfmt with stable toolchain
2626
uses: actions-rs/toolchain@v1
2727
with:
2828
profile: minimal
29-
toolchain: nightly
29+
toolchain: stable
3030
override: true
3131
components: rustfmt
3232
- uses: actions-rs/cargo@v1

.github/workflows/lint-javascript.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222
audit-js:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- name: Cache pnpm modules
2727
uses: actions/cache@v3
2828
with:
2929
path: ~/.pnpm-store
3030
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
3131
restore-keys: |
3232
${{ runner.os }}-
33-
- uses: actions/setup-node@v3
33+
- uses: actions/setup-node@v4
3434
with:
35-
node-version: '14'
35+
node-version: '18'
3636
- uses: pnpm/action-setup@v2.2.4
3737
with:
3838
run_install: true

.github/workflows/lint-rust.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929
- name: install webkit2gtk
3030
run: |
3131
sudo apt-get update

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
os: [ubuntu-latest, macos-latest, windows-latest]
2929

3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
- name: Install stable toolchain
3333
uses: actions-rs/toolchain@v1
3434
with:

CHANGELOG.md

-71
This file was deleted.

Cargo.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "mizuki"
33
version = "0.1.0"
4-
authors = [ "tonymushah <tonymushahDev06@yahoo.com>" ]
4+
authors = [ "Jonas Kruckenberg", "tonymushah <tonymushahDev06@yahoo.com>" ]
55
description = "A toolkit for building Tauri Plugins that enables type-safe IPC through GraphQL."
66
edition = "2021"
77
rust-version = "1.59"
@@ -11,9 +11,6 @@ repository = "https://github.com/tonymushah/mizuki"
1111
categories = [ "gui", "web-programming" ]
1212
keywords = [ "tauri-plugin", "graphql" ]
1313

14-
[package.metadata.docs.rs]
15-
features = [ "graphiql" ]
16-
1714
[dependencies]
1815
serde = { version = "1", features = [ "derive" ] }
1916
serde_json = "1"
@@ -22,7 +19,6 @@ async-graphql = "6"
2219

2320
[features]
2421
log = [ "async-graphql/log" ]
25-
tracing = [ "async-graphql/tracing" ]
2622
opentelemetry = [ "async-graphql/opentelemetry" ]
2723
bson = [ "async-graphql/bson" ]
2824
chrono = [ "async-graphql/chrono" ]

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Jonas Kruckenberg
3+
Copyright (c) 2023 Tony Mushah
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
1-
# Tauri Plugin graphql
1+
# Mizuki
22

33
[![Crates.io][crates-badge]][crates-url]
44
[![Documentation][docs-badge]][docs-url]
55
[![MIT licensed][mit-badge]][mit-url]
66

7-
[crates-badge]: https://img.shields.io/crates/v/tauri-plugin-graphql.svg
8-
[crates-url]: https://crates.io/crates/tauri-plugin-graphql
9-
[docs-badge]: https://img.shields.io/docsrs/tauri-plugin-graphql.svg
10-
[docs-url]: https://docs.rs/tauri-plugin-graphql
7+
[crates-badge]: https://img.shields.io/crates/v/mizuki.svg
8+
[crates-url]: https://crates.io/crates/mizuki
9+
[docs-badge]: https://img.shields.io/docsrs/mizuki.svg
10+
[docs-url]: https://docs.rs/mizuki
1111
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
1212
[mit-url]: LICENSE
1313

14-
A plugin for Tauri that enables type-safe IPC through GraphQL.
14+
A toolkit for building Tauri plugins that enables type-safe IPC through GraphQL.
15+
16+
## Notice
17+
18+
This project is a fork from [JonasKruckenberg/tauri-plugin-graphql][initial-repo].
19+
20+
But I thought that it would be a great a idea to push the plugin futher
21+
and create a toolkit for building GraphQL Tauri Plugins.
1522

1623
## Install
1724

1825
### Rust
1926

2027
```toml
2128
[dependencies]
22-
tauri-plugin-graphql = "2.0.0"
29+
mizuki = "0.1.0"
2330
```
2431

2532
### JavaScript
2633

27-
The only client-side adapter currently is `tauri-plugin-graphql-urql`, a custom exchange for [`urql`].
34+
The only client-side adapter currently is `@mizuki/urql`, a custom exchange for [`urql`].
2835
If you need adapters for other GraphQL clients, open a PR!
2936

3037
| Package | Version (click for changelogs) |
3138
|-------------------------------|--------------------------------|
32-
| [`tauri-plugin-graphql-urql`] | [![urql adapter version][urql-adapter-version-badge]][urql-adapter-changelog]
39+
| [`@mizuki/urql`] | [![urql adapter version][urql-adapter-version-badge]][urql-adapter-changelog]
3340

3441
## Usage
3542

@@ -75,7 +82,8 @@ fn main() {
7582
);
7683

7784
tauri::Builder::default()
78-
.plugin(tauri_plugin_graphql::init(schema))
85+
// The plugin name is required
86+
.plugin(mizuki::MizukiPlugin::new("todo-plugin", schema))
7987
.run(tauri::generate_context!())
8088
.expect("failed to run app");
8189
}
@@ -91,10 +99,11 @@ PRs are welcome!
9199

92100
## License
93101

94-
[MIT © Jonas Kruckenberg](./LICENSE)
102+
[MIT © Tony Mushah](./LICENSE)
95103

96-
[`tauri-plugin-graphql-urql`]: packages/urql
97-
[urql-adapter-version-badge]: https://img.shields.io/npm/v/tauri-plugin-graphql-urql?label=%20
104+
[`@mizuki/urql`]: packages/urql
105+
[urql-adapter-version-badge]: https://img.shields.io/npm/v/@mizuki/urql?label=%20
98106
[urql-adapter-changelog]: packages/urql/CHANGELOG.md
99107
[`urql`]: https://formidable.com/open-source/urql/
100108
[`async_graphql::Schema`]: https://docs.rs/async-graphql/latest/async_graphql/struct.Schema.html
109+
[initial-repo]: https://github.com/JonasKruckenberg/tauri-plugin-graphql

examples/preact-app/codegen.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CodegenConfig } from '@graphql-codegen/cli';
1+
import {CodegenConfig} from '@graphql-codegen/cli'
22

33
const config: CodegenConfig = {
44
schema: './myschema.graphqls',
@@ -7,9 +7,9 @@ const config: CodegenConfig = {
77
generates: {
88
'./src/gql/': {
99
preset: 'client',
10-
plugins: [],
11-
},
12-
},
13-
};
10+
plugins: []
11+
}
12+
}
13+
}
1414

15-
export default config;
15+
export default config

examples/preact-app/src-tauri/src/main.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ impl Subscription {
3434
}
3535

3636
fn main() {
37-
let my_plugin = mizuki::Mizuki::new("mizuki-test", Schema::new(Query, EmptyMutation, Subscription));
37+
let my_plugin = mizuki::MizukiPlugin::new(
38+
"mizuki-test",
39+
Schema::new(Query, EmptyMutation, Subscription),
40+
);
3841
my_plugin.export_sdl("../myschema.graphqls").unwrap();
3942
tauri::Builder::default()
4043
.plugin(my_plugin)

0 commit comments

Comments
 (0)