{"id":15887858,"url":"https://github.com/firede/electron-graphql","last_synced_at":"2025-03-20T08:33:06.022Z","repository":{"id":57221683,"uuid":"117805329","full_name":"firede/electron-graphql","owner":"firede","description":":electron: Lightweight GraphQL server \u0026 client for Electron apps. (WIP)","archived":false,"fork":false,"pushed_at":"2018-08-14T06:13:19.000Z","size":125,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T20:46:48.239Z","etag":null,"topics":["electron","electron-graphql","graphql","ipc"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/firede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-17T08:09:00.000Z","updated_at":"2022-10-04T10:06:44.000Z","dependencies_parsed_at":"2022-08-29T04:10:11.396Z","dependency_job_id":null,"html_url":"https://github.com/firede/electron-graphql","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Felectron-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Felectron-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Felectron-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firede%2Felectron-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firede","download_url":"https://codeload.github.com/firede/electron-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221744122,"owners_count":16873569,"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":["electron","electron-graphql","graphql","ipc"],"created_at":"2024-10-06T06:05:25.675Z","updated_at":"2024-10-27T23:21:18.790Z","avatar_url":"https://github.com/firede.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-graphql\n\nLightweight GraphQL server \u0026 client for Electron apps.\n\nThis project is **WORK IN PROGRESS**, do **NOT** try to use it :trollface:\n\n# Installation\n\n```sh\nnpm i electron-graphql\n```\n\n## Usage\n\n### main progress\n\n```js\n// `executor` only works in main progress\nconst { createGraphQLExecutor } = require(\"electron-graphql\")\n\n// create GraphQL executor\nconst gqlExecutor = createGraphQLExecutor({\n  // electron IPC channel (base name)\n  channel,\n  schema,\n  rootValue,\n  contextValue\n})\n\n// init GraphQL executor\ngqlExecutor.init()\n\n// dispose GraphQL executor\ngqlExecutor.dispose()\n```\n\n### renderer process\n\n```js\n// `fetcher` only works in renderer process\nimport { createGraphQLFetcher } from \"electron-graphql\"\n\n// create GraphQL fetcher\nconst gqlFetcher = createGraphQLFetcher({ channel, timeout })\n\n// init GraphQL fetcher\ngqlFetcher.init()\n\n// use GraphQL fetch\ngqlFetcher.fetch({ query, variables, operationName })\n  .then(result =\u003e {\n    const { data, errors, extensions } = result\n    // GraphQL errors and extensions are optional\n  })\n  .catch(error =\u003e {\n    //respond to a connect error\n  })\n\n// dispose GraphQL fetcher\ngqlFetcher.dispose()\n```\n\n## API\n\n(TODO).\n\n---\n\n\u003cp align=\"center\"\u003eMIT \u0026copy; \u003ca href=\"https://github.com/firede\"\u003eFirede\u003c/a\u003e, built with :coffee: \u0026amp; :sparkling_heart:\u003cp\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirede%2Felectron-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirede%2Felectron-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirede%2Felectron-graphql/lists"}