0.0
No release in over a year
A static version of the Altair GraphQL Client, for Rails and ActionCable subscriptions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

Altair Rails - The Altair GraphQL Client for Rails

Gem Version MIT License Build Status Maintainability Test Coverage RubyGems

Altair Rails is a Rails engine that provides a mountable endpoint for the Altair GraphQL Client.

Download and Installation

Add this line to your Gemfile:

gem "altair-rails"

Or install the latest version with RubyGems:

gem install altair-rails

Source code can be downloaded as part of the project on GitHub:

Configuration

By default the Altair GraphQL Client is mounted at /altair. It can be configured by adding an initializer to your Rails application:

Altair::Rails.configure do |config|
  # Where you want to mount the engine in your application. If set to nil,
  # the engine will not be mounted automatically and it will need to be
  # mounted manually. E.g.: in your routes.rb file, adding:
  #   mount Altair::Rails::Engine => "/altair"`
  config.mount_at = "/altair"

  # The path to your GraphQL endpoint. This is used to set the endpointURL.
  config.graphql_path = "/graphql"

  # The path to your ActionCable endpoint. This is used to set the
  # subscriptionsEndpoint.
  config.action_cable_path = "/cable"

  # Any options you want to pass to AltairGraphQL.init(). For more details:
  # https://github.com/altair-graphql/altair/blob/f433ee1bf6c52c8639b6448fa7e0c31c6ad955d1/packages/altair-core/src/config.ts
  config.altair_options = {}
end

Similar Projects

I created this project after battling GraphQL subscriptions, and GraphiQLs lack of support for ActionCable.

That being said, there are still great projects worth checking out:

  • graphiql-rails - A Rails engine that provides a mountable endpoint for GraphiQL.

License

This project is released under the MIT license:

Copyright 2023 jejacks0n

Make Code Not War

forthebadge