{"id":21413203,"url":"https://github.com/github0013/graphql_subscription_actioncable","last_synced_at":"2025-07-14T06:08:20.308Z","repository":{"id":141757054,"uuid":"145545730","full_name":"github0013/graphql_subscription_actioncable","owner":"github0013","description":"a sample repo of how to use subscription with graphql-ruby + apollo2","archived":false,"fork":false,"pushed_at":"2018-08-29T01:14:16.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T22:42:46.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/github0013.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-21T10:06:08.000Z","updated_at":"2018-08-23T04:55:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"53e26ba7-874c-4d06-87d3-e914706cefad","html_url":"https://github.com/github0013/graphql_subscription_actioncable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/github0013/graphql_subscription_actioncable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgraphql_subscription_actioncable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgraphql_subscription_actioncable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgraphql_subscription_actioncable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgraphql_subscription_actioncable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github0013","download_url":"https://codeload.github.com/github0013/graphql_subscription_actioncable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fgraphql_subscription_actioncable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265250991,"owners_count":23734838,"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":[],"created_at":"2024-11-22T18:17:31.505Z","updated_at":"2025-07-14T06:08:20.290Z","avatar_url":"https://github.com/github0013.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HOW TO USE GRAPHQL SUBSCRIPTION\n\nThis repo is using\n\n- rails\n- [graphql-ruby](https://github.com/rmosolgo/graphql-ruby)\n- [apollo2](https://www.apollographql.com/docs/react/essentials/get-started.html#installation)\n- [ActionCable](http://graphql-ruby.org/javascript_client/apollo_subscriptions#apollo-2--actioncable)\n\n\n## JUST TRY IT OUT\n\n```bash\ngit clone https://github.com/github0013/graphql_subscription_actioncable.git\ncd graphql_subscription_actioncable\nrails s\n```\n\nthen open `http://localhost:3000/`. \nYou should only see this.\n\n![](https://raw.githubusercontent.com/github0013/graphql_subscription_actioncable/master/doc/loading.png)\n\n\nOpen another terminal and run\n```bash\nrails c\n\n\u003e GraphqlSubscriptionActioncableSchema.subscriptions.trigger('testSub', {}, Time.now.to_i)\n```\n\nthen you should see a timestamp number on the page.\n\n![](https://raw.githubusercontent.com/github0013/graphql_subscription_actioncable/master/doc/triggered.png)\n\n## THINGS TO CHECK WHEN YOU IMPLEMENT GRAPHQL SUBSCRIPTION\n\n- [check ActionCable's allowed origins](https://guides.rubyonrails.org/action_cable_overview.html#allowed-request-origins)\n- [check cable.yml](https://guides.rubyonrails.org/action_cable_overview.html#adapter-configuration)\n**be sure to use anything other than `adapter: async`**\n- don't just copy [GraphqlChannel sample](http://graphql-ruby.org/api-doc/1.8.7/GraphQL/Subscriptions/ActionCableSubscriptions) as is. It needs some changes.\n\n## check the git log\nI kept commands I ran in the log.   It should self-explanatory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0013%2Fgraphql_subscription_actioncable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub0013%2Fgraphql_subscription_actioncable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0013%2Fgraphql_subscription_actioncable/lists"}