packages feed

morpheus-graphql-subscriptions 0.20.1 → 0.21.0

raw patch · 4 files changed

+24/−17 lines, 4 filesdep ~morpheus-graphql-appdep ~morpheus-graphql-coredep ~websocketsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: morpheus-graphql-app, morpheus-graphql-core, websockets

API changes (from Hackage documentation)

+ Data.Morpheus.Subscriptions.Internal: ApolloSubscription :: Maybe ID -> Text -> Maybe payload -> ApolloSubscription payload
+ Data.Morpheus.Subscriptions.Internal: ConnectionInit :: ApolloAction
+ Data.Morpheus.Subscriptions.Internal: SessionStart :: ID -> GQLRequest -> ApolloAction
+ Data.Morpheus.Subscriptions.Internal: SessionStop :: ID -> ApolloAction
+ Data.Morpheus.Subscriptions.Internal: [apolloId] :: ApolloSubscription payload -> Maybe ID
+ Data.Morpheus.Subscriptions.Internal: [apolloPayload] :: ApolloSubscription payload -> Maybe payload
+ Data.Morpheus.Subscriptions.Internal: [apolloType] :: ApolloSubscription payload -> Text
+ Data.Morpheus.Subscriptions.Internal: data ApolloAction
+ Data.Morpheus.Subscriptions.Internal: data ApolloSubscription payload

Files

morpheus-graphql-subscriptions.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           morpheus-graphql-subscriptions-version:        0.20.1+version:        0.21.0 synopsis:       Morpheus GraphQL Subscriptions description:    Build GraphQL APIs with your favourite functional language! category:       web, graphql, subscriptions@@ -43,8 +43,8 @@       aeson >=1.4.4 && <3.0.0     , base >=4.7.0 && <5.0.0     , bytestring >=0.10.4 && <0.12.0-    , morpheus-graphql-app >=0.20.0 && <0.21.0-    , morpheus-graphql-core >=0.20.0 && <0.21.0+    , morpheus-graphql-app >=0.21.0 && <0.22.0+    , morpheus-graphql-core >=0.21.0 && <0.22.0     , mtl >=2.0.0 && <3.0.0     , relude >=0.3.0 && <2.0.0     , text >=1.2.3 && <1.3.0@@ -52,7 +52,7 @@     , unliftio-core >=0.0.1 && <0.4.0     , unordered-containers >=0.2.8 && <0.3.0     , uuid >=1.0.0 && <1.4.0-    , websockets >=0.11.0 && <1.0.0+    , websockets >=0.12.6.0 && <1.0.0   default-language: Haskell2010  test-suite morpheus-subscription-test@@ -68,8 +68,8 @@     , base >=4.7.0 && <5.0.0     , bytestring >=0.10.4 && <0.12.0     , directory >=1.0.0 && <2.0.0-    , morpheus-graphql-app >=0.20.0 && <0.21.0-    , morpheus-graphql-core >=0.20.0 && <0.21.0+    , morpheus-graphql-app >=0.21.0 && <0.22.0+    , morpheus-graphql-core >=0.21.0 && <0.22.0     , mtl >=2.0.0 && <3.0.0     , relude >=0.3.0 && <2.0.0     , tasty >=0.1.0 && <1.5.0@@ -79,5 +79,5 @@     , unliftio-core >=0.0.1 && <0.4.0     , unordered-containers >=0.2.8 && <0.3.0     , uuid >=1.0.0 && <1.4.0-    , websockets >=0.11.0 && <1.0.0+    , websockets >=0.12.6.0 && <1.0.0   default-language: Haskell2010
src/Data/Morpheus/Subscriptions/Apollo.hs view
@@ -10,22 +10,23 @@     acceptApolloRequest,     toApolloResponse,     Validation,+    ApolloSubscription (..),   ) where  import Control.Applicative (Applicative (..)) import Control.Monad.IO.Class (MonadIO (..)) import Data.Aeson-  ( (.:),-    (.:?),-    (.=),-    FromJSON (..),+  ( FromJSON (..),     ToJSON (..),     Value (..),     eitherDecode,     encode,     pairs,     withObject,+    (.:),+    (.:?),+    (.=),   ) import Data.ByteString.Lazy.Char8   ( ByteString,@@ -64,10 +65,10 @@     pendingRequest,   ) import Prelude-  ( ($),-    (.),-    Show,+  ( Show,     String,+    ($),+    (.),   )  type ID = Text@@ -96,7 +97,9 @@   parseJSON = withObject "ApolloPayload" objectParser     where       objectParser o =-        RequestPayload <$> o .:? "operationName" <*> o .:? "query"+        RequestPayload+          <$> o .:? "operationName"+          <*> o .:? "query"           <*> o .:? "variables"  instance ToJSON a => ToJSON (ApolloSubscription a) where
src/Data/Morpheus/Subscriptions/Internal.hs view
@@ -32,6 +32,8 @@     storedSessions,     storedChannels,     streamApp,+    ApolloSubscription (..),+    ApolloAction (..),   ) where @@ -53,7 +55,9 @@   ( empty,   ) import Data.Morpheus.Subscriptions.Apollo-  ( acceptApolloRequest,+  ( ApolloAction (..),+    ApolloSubscription (..),+    acceptApolloRequest,   ) import Data.Morpheus.Subscriptions.ClientConnectionStore   ( ClientConnectionStore,
src/Data/Morpheus/Subscriptions/Stream.hs view
@@ -139,7 +139,7 @@   Output SUB (Event ch con) m handleWSRequest gqlApp clientId = handle . apolloFormat   where-    --handle :: Applicative m => Validation ApolloAction -> Stream SUB e m+    -- handle :: Applicative m => Validation ApolloAction -> Stream SUB e m     handle = either (liftWS . Left) handleAction     --------------------------------------------------     -- handleAction :: ApolloAction -> Stream SUB e m