{"id":16410600,"url":"https://github.com/acro5piano/graphwire","last_synced_at":"2025-10-26T19:30:35.920Z","repository":{"id":47039570,"uuid":"394977915","full_name":"acro5piano/graphwire","owner":"acro5piano","description":"Pusher for GraphQL; A GraphQL proxy server which turns your query into real-time live query!","archived":false,"fork":false,"pushed_at":"2021-10-27T02:17:45.000Z","size":338,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T22:25:38.394Z","etag":null,"topics":["graphql","graphql-subscriptions","live-queries","nodejs","proxy","realtime","typescript","websockets"],"latest_commit_sha":null,"homepage":"https://graphwire.netlify.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acro5piano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-11T12:16:39.000Z","updated_at":"2022-12-09T14:26:32.000Z","dependencies_parsed_at":"2022-09-26T19:00:29.288Z","dependency_job_id":null,"html_url":"https://github.com/acro5piano/graphwire","commit_stats":null,"previous_names":["acro5piano/graphql-subscription-proxy"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acro5piano%2Fgraphwire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acro5piano%2Fgraphwire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acro5piano%2Fgraphwire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acro5piano%2Fgraphwire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acro5piano","download_url":"https://codeload.github.com/acro5piano/graphwire/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238386321,"owners_count":19463341,"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","graphql-subscriptions","live-queries","nodejs","proxy","realtime","typescript","websockets"],"created_at":"2024-10-11T06:43:23.341Z","updated_at":"2025-10-26T19:30:35.596Z","avatar_url":"https://github.com/acro5piano.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![test](https://github.com/acro5piano/graphwire/workflows/test/badge.svg)\n![release](https://github.com/acro5piano/graphwire/workflows/release/badge.svg)\n[![npm version](https://badge.fury.io/js/graphwire.svg)](https://badge.fury.io/js/graphwire)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"https://raw.githubusercontent.com/acro5piano/graphwire/master/assets/logo.svg\"\u003e\n\u003c/p\u003e\n\n# Graphwire\n\nA GraphQL proxy server which turns your query into real-time live query!\n\n# Motivation\n\nGraphQL Subscription is hard to build. It is troublesome and requires lots of work.\n\n- WebSocket connection over a load balancer\n- Performance optimization when publishing\n- Testing\n- Logic duplication among queries and subscriptions\n- Initial publish for live query\n\nTo solve these problems, `Graphwire` provides a new way: **Proxy GraphQL Queries and make it real-time subscriptions!**\n\n# How it works\n\n![image](https://user-images.githubusercontent.com/10719495/129064036-c70b9afc-be57-4b21-b452-0c40bd7ece57.png)\n\nBenefits:\n\n- No need to write your subscription logic\n- No need to prepare Redis instance (for small use-case)\n- Use completely the same logic as your Queries\n\n# Try it yourself\n\n### Step 1. Run the proxy server\n\n```\nnpx graphwire --upstream-url https://api.graphql.jobs\n```\n\nNote that https://api.graphql.jobs does not provide Subscription. `graphql-subscription-proxy` forward subscriptions between users and the upstream server.\n\n### Step 2. Subscribe\n\nOpen http://0.0.0.0:1989/altair and run the following query:\n\n```graphql\nsubscription TestSubscription {\n  city(input: { slug: \"berlin\" }) {\n    id\n    name\n    slug\n    __typename\n  }\n}\n```\n\nThen you will see the initial subscription data like this.\n\n![image](https://user-images.githubusercontent.com/10719495/133450990-5844fcb7-56aa-4a1b-b0e7-a3f14f14361a.png)\n\n### Step 3. Publish (invalidate)\n\nWhile keeping the subscription up, open your terminal and run the following command:\n\n```\ncurl -XPOST http://0.0.0.0:1989/v1/publish -d topic=City:cjuv51m3s00fc0735xosrvscp\n```\n\nAnd you'll see a new subscription is published!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facro5piano%2Fgraphwire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facro5piano%2Fgraphwire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facro5piano%2Fgraphwire/lists"}