{"id":19557165,"url":"https://github.com/gingray/ruby-graphql-subscription-client","last_synced_at":"2026-04-28T16:07:09.403Z","repository":{"id":39065712,"uuid":"278087456","full_name":"gingray/ruby-graphql-subscription-client","owner":"gingray","description":"ruby graphql subsctiption client to test subscription through the ActionCable","archived":false,"fork":false,"pushed_at":"2023-01-07T19:54:40.000Z","size":1928,"stargazers_count":0,"open_issues_count":20,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-19T04:30:08.131Z","etag":null,"topics":["actioncable","apollo-client","apollographql","graphql","rails","ruby","subscription"],"latest_commit_sha":null,"homepage":"https://github.com/gingray/ruby-graphql-subsctiption-client","language":"JavaScript","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/gingray.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":"2020-07-08T12:47:34.000Z","updated_at":"2020-10-16T21:29:42.000Z","dependencies_parsed_at":"2023-02-07T23:46:25.177Z","dependency_job_id":null,"html_url":"https://github.com/gingray/ruby-graphql-subscription-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gingray/ruby-graphql-subscription-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingray%2Fruby-graphql-subscription-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingray%2Fruby-graphql-subscription-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingray%2Fruby-graphql-subscription-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingray%2Fruby-graphql-subscription-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gingray","download_url":"https://codeload.github.com/gingray/ruby-graphql-subscription-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gingray%2Fruby-graphql-subscription-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["actioncable","apollo-client","apollographql","graphql","rails","ruby","subscription"],"created_at":"2024-11-11T04:40:34.887Z","updated_at":"2026-04-28T16:07:09.374Z","avatar_url":"https://github.com/gingray.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL Subscription test(sandbox) ruby client\n\nIt's small test(sandbox) setup for graphql subscription when you use it with  \n\n`gem 'graphql'`  \n\n**Change urls in `src/index.js` to your endpoints**  \n\nTo run example:  \n`npm install`  \n`npm start`\n\ntrigger from Rails console example:  \n`BackendSchema.subscriptions.trigger(:hello, {}, 'test')`  \njust mention configs that probably can save you time\n\n```ruby\n# app/graphql/backend_schema.rb\n\nclass BackendSchema \u003c GraphQL::Schema\n  # Assume that use ActionCable\n  use GraphQL::Subscriptions::ActionCableSubscriptions, redis: Redis.new\n  subscription(Types::SubscriptionType)\n  # other configs removed to not to distract attention\nend\n```\n\n```ruby\n# app/graphql/types/subscription_type.rb\nmodule Types\n  class SubscriptionType \u003c Types::BaseObject\n    field :notify_display, subscription: Subscription::NotifyDisplay\n  end\nend\n```\n\n```ruby\n# app/graphql/subscription/notify_display.rb\n\nmodule Subscription\n  class NotifyDisplay \u003c Subscription::BaseSubscription\n    argument :display_id, Int, required: true\n    field :message, String, null: true\n\n    def subscribe(display_id:)\n      :no_response\n    end\n\n    def update(display_id:)\n      # where object come from its payload which send\n      # thorugh the trigger function\n      # https://graphql-ruby.org/subscriptions/triggers.html\n      { message: object }\n    end\n  end\nend\n```\n\n```ruby\n# config/environments/development.rb\n\nconfig.action_cable.allowed_request_origins = [/http:\\/\\/*/, /https:\\/\\/*/, /file:\\/\\/*/, 'file://']\n```\n\n```ruby\n# config/application.rb\n\nif Rails.env.test? || Rails.env.development?\n  config.middleware.insert_before 0, Rack::Cors do\n    allow do\n      origins \"*\"\n      resource \"*\", headers: :any, methods: [:get, :post, :options, :patch, :put, :delete]\n    end\n  end\nend\n```\n\n[WARN] this line below put only in development mode with ActionCable\n```ruby\n# config/routes.rb\n\nmount ActionCable.server, at: '/cable'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgingray%2Fruby-graphql-subscription-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgingray%2Fruby-graphql-subscription-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgingray%2Fruby-graphql-subscription-client/lists"}