graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.GraphQL.Transport.WebSocket.Protocol

Description

This file contains types for both the websocket protocols (Apollo) and (graphql-ws) | See Apollo: https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md | See graphql-ws: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md

Synopsis

Documentation

newtype OperationId Source #

Constructors

OperationId 

Fields

Instances

Instances details
Eq OperationId Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Show OperationId Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

IsString OperationId Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Hashable OperationId Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

FromJSON OperationId Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

parseJSON :: Value -> Parser OperationId

parseJSONList :: Value -> Parser [OperationId]

ToJSON OperationId Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

toJSON :: OperationId -> Value

toEncoding :: OperationId -> Encoding

toJSONList :: [OperationId] -> Value

toEncodingList :: [OperationId] -> Encoding

data ConnParams Source #

Constructors

ConnParams 

Fields

Instances

Instances details
Eq ConnParams Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Show ConnParams Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

FromJSON ConnParams Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

parseJSON :: Value -> Parser ConnParams

parseJSONList :: Value -> Parser [ConnParams]

ToJSON ConnParams Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

toJSON :: ConnParams -> Value

toEncoding :: ConnParams -> Encoding

toJSONList :: [ConnParams] -> Value

toEncodingList :: [ConnParams] -> Encoding

data StartMsg Source #

Constructors

StartMsg 

Instances

Instances details
Eq StartMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Show StartMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

FromJSON StartMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

parseJSON :: Value -> Parser StartMsg

parseJSONList :: Value -> Parser [StartMsg]

ToJSON StartMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

toJSON :: StartMsg -> Value

toEncoding :: StartMsg -> Encoding

toJSONList :: [StartMsg] -> Value

toEncodingList :: [StartMsg] -> Encoding

data StopMsg Source #

Constructors

StopMsg 

Fields

Instances

Instances details
Eq StopMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

(==) :: StopMsg -> StopMsg -> Bool #

(/=) :: StopMsg -> StopMsg -> Bool #

Show StopMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

FromJSON StopMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

parseJSON :: Value -> Parser StopMsg

parseJSONList :: Value -> Parser [StopMsg]

ToJSON StopMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

toJSON :: StopMsg -> Value

toEncoding :: StopMsg -> Encoding

toJSONList :: [StopMsg] -> Value

toEncodingList :: [StopMsg] -> Encoding

data DataMsg Source #

Constructors

DataMsg 

data ErrorMsg Source #

Constructors

ErrorMsg 

Fields

Instances

Instances details
Eq ErrorMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Show ErrorMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

newtype ConnErrMsg Source #

Constructors

ConnErrMsg 

Fields

Instances

Instances details
Eq ConnErrMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Show ConnErrMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

IsString ConnErrMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

FromJSON ConnErrMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

parseJSON :: Value -> Parser ConnErrMsg

parseJSONList :: Value -> Parser [ConnErrMsg]

ToJSON ConnErrMsg Source # 
Instance details

Defined in Hasura.GraphQL.Transport.WebSocket.Protocol

Methods

toJSON :: ConnErrMsg -> Value

toEncoding :: ConnErrMsg -> Encoding

toJSONList :: [ConnErrMsg] -> Value

toEncodingList :: [ConnErrMsg] -> Encoding

data ServerErrorMsg Source #

Constructors

ServerErrorMsg 

Fields

data ServerErrorCode Source #

This is sent from the server to the client while closing the websocket on encountering an error.