{"id":13800736,"url":"https://github.com/JonasKruckenberg/tauri-plugin-graphql","last_synced_at":"2025-05-13T09:31:52.461Z","repository":{"id":37022218,"uuid":"475950142","full_name":"JonasKruckenberg/tauri-plugin-graphql","owner":"JonasKruckenberg","description":"Type-safe IPC for Tauri using GraphQL","archived":false,"fork":false,"pushed_at":"2025-04-05T01:34:20.000Z","size":1364,"stargazers_count":78,"open_issues_count":42,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T08:46:10.341Z","etag":null,"topics":["graphql","javascript","rust","tauri","tauri-plugin","typescript"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonasKruckenberg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["JonasKruckenberg"],"open_collective":null,"custom":["https://paypal.me/jonaskruckie"]}},"created_at":"2022-03-30T15:53:39.000Z","updated_at":"2025-03-31T01:29:23.000Z","dependencies_parsed_at":"2023-02-17T01:15:57.440Z","dependency_job_id":"40a9e225-c105-4707-beb6-db93ca2eacd8","html_url":"https://github.com/JonasKruckenberg/tauri-plugin-graphql","commit_stats":{"total_commits":198,"total_committers":5,"mean_commits":39.6,"dds":0.5,"last_synced_commit":"78b092deda2e8621a2291c480372d7b3e814b735"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasKruckenberg%2Ftauri-plugin-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasKruckenberg%2Ftauri-plugin-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasKruckenberg%2Ftauri-plugin-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonasKruckenberg%2Ftauri-plugin-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonasKruckenberg","download_url":"https://codeload.github.com/JonasKruckenberg/tauri-plugin-graphql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253913223,"owners_count":21983277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","javascript","rust","tauri","tauri-plugin","typescript"],"created_at":"2024-08-04T00:01:15.716Z","updated_at":"2025-05-13T09:31:50.544Z","avatar_url":"https://github.com/JonasKruckenberg.png","language":"Rust","funding_links":["https://github.com/sponsors/JonasKruckenberg","https://paypal.me/jonaskruckie"],"categories":["Rust","Development"],"sub_categories":["Plugins"],"readme":"# Tauri Plugin graphql\n\n[![Crates.io][crates-badge]][crates-url]\n[![Documentation][docs-badge]][docs-url]\n[![MIT licensed][mit-badge]][mit-url]\n\n[crates-badge]: https://img.shields.io/crates/v/tauri-plugin-graphql.svg\n[crates-url]: https://crates.io/crates/tauri-plugin-graphql\n[docs-badge]: https://img.shields.io/docsrs/tauri-plugin-graphql.svg\n[docs-url]: https://docs.rs/tauri-plugin-graphql\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[mit-url]: LICENSE\n\nA plugin for Tauri that enables type-safe IPC through GraphQL.\n\n## Install\n\n### Rust\n\n```toml\n[dependencies]\ntauri-plugin-graphql = \"2.0.0\"\n```\n\n### JavaScript\n\nThe only client-side adapter currently is `tauri-plugin-graphql-urql`, a custom exchange for [`urql`]. \nIf you need adapters for other GraphQL clients, open a PR!\n\n| Package                       | Version (click for changelogs) |\n|-------------------------------|--------------------------------|\n| [`tauri-plugin-graphql-urql`] | [![urql adapter version][urql-adapter-version-badge]][urql-adapter-changelog]\n\n## Usage\n\nYou need to register the plugin giving it a [`async_graphql::Schema`]. This schema will be used to fulfill requests.\n\n```rust\nuse async_graphql::{Schema, Object, EmptySubscription, EmptyMutation, Result as GraphQLResult, SimpleObject};\n\n#[derive(SimpleObject, Debug, Clone)]\nstruct ListItem {\n    id: i32,\n    text: String\n}\n\nimpl ListItem {\n    pub fn new(text: String) -\u003e Self {\n        Self {\n            id: rand::random::\u003ci32\u003e(),\n            text\n        }\n    }\n}\n\nstruct Query;\n\n#[Object]\nimpl Query {\n    async fn list(\u0026self) -\u003e GraphQLResult\u003cVec\u003cListItem\u003e\u003e {\n        let item = vec![\n            ListItem::new(\"foo\".to_string()),\n            ListItem::new(\"bar\".to_string())\n        ];\n\n        Ok(item)\n    }\n}\n\nfn main() {\n    let schema = Schema::new(\n        Query,\n        EmptyMutation,\n        EmptySubscription,\n    );\n\n    tauri::Builder::default()\n        .plugin(tauri_plugin_graphql::init(schema))\n        .run(tauri::generate_context!())\n        .expect(\"failed to run app\");\n}\n```\n\n## Contributing\n\nIf you want to help out, there are a few areas that need improvement:\n\n- **Client Adapters** - Currently, only a urql adapter exists; having adapters for more client libraries would be very nice.\n\nPRs are welcome!\n\n## License\n\n[MIT © Jonas Kruckenberg](./LICENSE)\n\n[`tauri-plugin-graphql-urql`]: packages/urql\n[urql-adapter-version-badge]: https://img.shields.io/npm/v/tauri-plugin-graphql-urql?label=%20\n[urql-adapter-changelog]: packages/urql/CHANGELOG.md\n[`urql`]: https://formidable.com/open-source/urql/\n[`async_graphql::Schema`]: https://docs.rs/async-graphql/latest/async_graphql/struct.Schema.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJonasKruckenberg%2Ftauri-plugin-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJonasKruckenberg%2Ftauri-plugin-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJonasKruckenberg%2Ftauri-plugin-graphql/lists"}