Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 2.39 KB

graphql-subscriptions.md

File metadata and controls

42 lines (27 loc) · 2.39 KB
parent
Features

GraphQL Subscriptions (with desktop notifications)

You can test your GraphQL subscriptions easily and also get a notification when you are away from the app (desktop apps only). This is very handy when developing apps that use the realtime feature of GraphQL, like chatting ang gaming applications that need realtime feedback.

Altair supports a number of subscription implementations:

Websocket

This supports the GraphQL over websocket protocol, which is the more common specification used for GraphQL subscriptions.

AWS AppSync

This supports the MQTT-based subscription protocol used in AWS AppSync which is an enterprise-level, fully managed GraphQL service with real-time data synchronization and offline programming features.

The connection parameters are in JSON format as following

{
  "aws_project_region": "<AWS_REGION>", //AWS Region abbreviation
  "aws_appsync_graphQlEndpoint": "https://******", //The value you can copy from AWS AppSync Endpoint, please use the HTTPS value
  "aws_appsync_region": "<AWS_REGION>", //AWS Region abbreviation
  "aws_appsync_authenicationType": "<AWS_APPYSYNC_Authenication_TYPE>", //API_KEY, OPENID_CONNECT or AMAZON_COGNITO_USER_POOLS (IAM is not supported)
  "aws_appsync_apiKey": "*******", //API Key, required if authenication type = API_KEY,
  "aws_appsync_jwtToken": "******", //JWT Token, required if authenication type = OPENID_CONNECT or AMAZON_COGNITO_USER_POOLS
}

Specifying connection parameters

AWS AppSync subscription

Rails Action Cable

Action Cable seamlessly integrates WebSockets with the rest of your Rails application. It allows for real-time features to be written in Ruby in the same style and form as the rest of your Rails application, while still being performant and scalable.

Specifing action cable connection parameters

Action cable subscription