packages feed

morpheus-graphql-core 0.27.3 → 0.28.0

raw patch · 8 files changed

+47/−35 lines, 8 filesdep ~bytestringdep ~containersdep ~morpheus-graphql-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring, containers, morpheus-graphql-core, morpheus-graphql-tests, tasty

API changes (from Hackage documentation)

+ Data.Morpheus.Core: [introspection] :: Config -> Bool
- Data.Morpheus.Core: Config :: Bool -> VALIDATION_MODE -> Config
+ Data.Morpheus.Core: Config :: Bool -> VALIDATION_MODE -> Bool -> Config
- Data.Morpheus.Types.Internal.AST: getInputUnionValue :: forall stage. Object stage -> Either GQLError (TypeName, Value stage)
+ Data.Morpheus.Types.Internal.AST: getInputUnionValue :: MonadError GQLError m => Object stage -> m (TypeName, Value stage)

Files

morpheus-graphql-core.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack  name:           morpheus-graphql-core-version:        0.27.3+version:        0.28.0 synopsis:       Morpheus GraphQL Core description:    Build GraphQL APIs with your favorite functional language! category:       web, graphql@@ -241,8 +241,8 @@   build-depends:       aeson >=1.4.4 && <3.0.0     , base >=4.7.0 && <5.0.0-    , bytestring >=0.10.4 && <0.12.0-    , containers >=0.4.2.1 && <0.7.0+    , bytestring >=0.10.4 && <0.15.0+    , containers >=0.4.2.1 && <=0.7     , hashable >=1.0.0 && <2.0.0     , megaparsec >=7.0.0 && <10.0.0     , mtl >=2.0.0 && <3.0.0@@ -267,17 +267,17 @@   build-depends:       aeson >=1.4.4 && <3.0.0     , base >=4.7.0 && <5.0.0-    , bytestring >=0.10.4 && <0.12.0-    , containers >=0.4.2.1 && <0.7.0+    , bytestring >=0.10.4 && <0.15.0+    , containers >=0.4.2.1 && <=0.7     , directory >=1.0.0 && <2.0.0     , hashable >=1.0.0 && <2.0.0     , megaparsec >=7.0.0 && <10.0.0-    , morpheus-graphql-core-    , morpheus-graphql-tests >=0.27.0 && <0.28.0+    , morpheus-graphql-core >=0.28.0 && <0.29.0+    , morpheus-graphql-tests >=0.28.0 && <0.29.0     , mtl >=2.0.0 && <3.0.0     , relude >=0.3.0 && <2.0.0     , scientific >=0.3.6.2 && <0.4.0-    , tasty >=0.1.0 && <1.5.0+    , tasty >=0.1.0 && <=1.5     , tasty-hunit >=0.1.0 && <1.0.0     , template-haskell >=2.0.0 && <3.0.0     , text >=1.2.3 && <3.0.0
src/Data/Mergeable/IsMap.hs view
@@ -18,7 +18,10 @@ import Data.Aeson.Key (Key) import qualified Data.Aeson.KeyMap as A #endif+{- ORMOLU_DISABLE -} import qualified Data.HashMap.Lazy as HM+import qualified Data.Map as M+{- ORMOLU_ENABLE -} import Data.Mergeable.Internal.Merge (mergeNoDuplicates) import Data.Mergeable.Internal.NameCollision (NameCollision) import Relude@@ -41,6 +44,13 @@   lookup = HM.lookup   member = HM.member   toAssoc = HM.toList++instance (Eq k, Ord k) => IsMap k (Map k) where+  unsafeFromList = M.fromList+  singleton = M.singleton+  lookup = M.lookup+  member = M.member+  toAssoc = M.toList  #if MIN_VERSION_aeson(2,0,0) instance IsMap Key A.KeyMap where
src/Data/Morpheus/Parser.hs view
@@ -17,11 +17,9 @@ import Data.Morpheus.Internal.Utils ((<:>)) import Data.Morpheus.Parsing.Document.TypeSystem   ( parseDefinitions,+    parseSchemaWithoutValidation,     parseTypeDefinitions,   )-import qualified Data.Morpheus.Parsing.Document.TypeSystem as P-  ( parseSchema,-  ) import Data.Morpheus.Parsing.Request.Parser   ( parseRequest,   )@@ -50,11 +48,12 @@   ByteString -> GQLResult (Schema VALID) parseSchema =   sortErrors-    . ( P.parseSchema+    . ( parseSchemaWithoutValidation           >=> validateSchema             True             Config               { debug = False,+                introspection = True,                 validationMode = FULL_VALIDATION               }       )
src/Data/Morpheus/Parsing/Document/TypeSystem.hs view
@@ -8,7 +8,7 @@ {-# LANGUAGE NoImplicitPrelude #-}  module Data.Morpheus.Parsing.Document.TypeSystem-  ( parseSchema,+  ( parseSchemaWithoutValidation,     parseTypeDefinitions,     parseDefinitions,   )@@ -106,7 +106,7 @@ --    Description(opt) scalar Name Directives(Const)(opt) -- scalarTypeDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (TypeDefinition ANY s) scalarTypeDefinition typeDescription =@@ -133,7 +133,7 @@ --    Description(opt) Name ArgumentsDefinition(opt) : Type Directives(Const)(opt) -- objectTypeDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (TypeDefinition ANY s) objectTypeDefinition typeDescription =@@ -158,7 +158,7 @@ --    Description(opt) interface Name Directives(Const)(opt) FieldsDefinition(opt) -- interfaceTypeDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (TypeDefinition ANY s) interfaceTypeDefinition typeDescription =@@ -179,7 +179,7 @@ --      UnionMemberTypes | NamedType -- unionTypeDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (TypeDefinition ANY s) unionTypeDefinition typeDescription =@@ -207,7 +207,7 @@ --    Description(opt) EnumValue Directives(Const)(opt) -- enumTypeDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (TypeDefinition ANY s) enumTypeDefinition typeDescription =@@ -227,7 +227,7 @@ --     { InputValueDefinition(list) } -- inputObjectTypeDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (TypeDefinition ANY s) inputObjectTypeDefinition typeDescription =@@ -248,7 +248,7 @@ --    DirectiveLocations | DirectiveLocation --    |[opt] DirectiveLocation parseDirectiveDefinition ::-  Parse (Value s) =>+  (Parse (Value s)) =>   Maybe Description ->   Parser (DirectiveDefinition s) parseDirectiveDefinition directiveDefinitionDescription =@@ -372,5 +372,5 @@ parseTypeDefinitions :: ByteString -> GQLResult [TypeDefinition ANY CONST] parseTypeDefinitions = fmap (\d -> [td | RawTypeDefinition td <- d]) . parseDefinitions -parseSchema :: ByteString -> GQLResult (Schema CONST)-parseSchema = typeSystemDefinition >=> buildSchema+parseSchemaWithoutValidation :: ByteString -> GQLResult (Schema CONST)+parseSchemaWithoutValidation = typeSystemDefinition >=> buildSchema
src/Data/Morpheus/Schema/DSL.hs view
@@ -21,7 +21,7 @@   ( Result (..),   ) import Data.Morpheus.Parsing.Document.TypeSystem-  ( parseSchema,+  ( parseSchemaWithoutValidation,   ) import Language.Haskell.TH import Language.Haskell.TH.Quote@@ -39,6 +39,6 @@     notHandled things = error $ things <> " are not supported by the GraphQL QuasiQuoter"  dslExpression :: ByteString -> Q Exp-dslExpression doc = case parseSchema doc of+dslExpression doc = case parseSchemaWithoutValidation doc of   Failure errors -> fail (renderGQLErrors errors)   Success {result, warnings} -> gqlWarnings warnings >> [|result|]
src/Data/Morpheus/Types/Internal/AST/TypeCategory.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveAnyClass #-}+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-}@@ -40,7 +42,7 @@   | OBJECT   | INPUT_OBJECT   | IMPLEMENTABLE-  deriving (Show, Eq, Ord)+  deriving (Show, Eq, Ord, Generic, Hashable)  type IN = 'IN 
src/Data/Morpheus/Types/Internal/AST/Union.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveLift #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -20,7 +21,7 @@   ) where -import Control.Monad.Except (throwError)+import Control.Monad.Except (MonadError (..)) import Data.Mergeable (NameCollision (..), OrdMap) import Data.Morpheus.Internal.Utils   ( Empty (empty),@@ -91,10 +92,7 @@ instance KeyOf TypeName (UnionMember cat s) where   keyOf = memberName -getInputUnionValue ::-  forall stage.-  Object stage ->-  Either GQLError (TypeName, Value stage)+getInputUnionValue :: (MonadError GQLError m) => Object stage -> m (TypeName, Value stage) getInputUnionValue hm =   case toList hm of     [] -> throwError "Exclusive input objects must provide a value for at least one field."@@ -117,7 +115,7 @@     name     tags -mkInputUnionFields :: Foldable t => t (UnionMember IN s) -> FieldsDefinition IN s+mkInputUnionFields :: (Foldable t) => t (UnionMember IN s) -> FieldsDefinition IN s mkInputUnionFields = unsafeFromFields . fmap mkInputUnionField . toList  mkInputUnionField :: UnionMember IN s -> FieldDefinition IN s
src/Data/Morpheus/Types/Internal/Config.hs view
@@ -17,7 +17,8 @@  data Config = Config   { debug :: Bool,-    validationMode :: VALIDATION_MODE+    validationMode :: VALIDATION_MODE,+    introspection :: Bool   }   deriving (Show) @@ -25,12 +26,14 @@ defaultConfig =   Config     { debug = False,-      validationMode = FULL_VALIDATION+      validationMode = FULL_VALIDATION,+      introspection = True     }  debugConfig :: Config debugConfig =   Config     { debug = True,-      validationMode = FULL_VALIDATION+      validationMode = FULL_VALIDATION,+      introspection = True     }