morpheus-graphql v0.15.0 Release Notes
Release Date: 2020-09-12 // over 3 years ago-
๐ new features
- custom operation root types: e.g
RootResolver IO () MyQuery MyMutation Undefined
creates app with:
schema { query: MyQuery mutation: MyMutation }
- type :
App event m
andderiveApp
app :: App EVENT IO app = runApp (deriveApp root) api :: a -> IO b api = runApp (deriveApp root)
- ๐
App
supports semigroup(schema Stitching
): if whe have two graphql apps
mergedApi :: a -> m b mergedApi = runApp (deriveApp root <> deriveApp root2)
GQLType
exposestypeOptions
to modify labels:typeOptions :: f a -> GQLTypeOptions
where
GQLTypeOptions { fieldLabelModifier :: String -> String, constructorTagModifier :: String -> String }
you can use
GQLType.getDescriptions
to document field or enum Valueswith
importGQLDocumentWithNamespace
now you can use Enums with Colliding Values:
enum X { A } enum Y { A }
they will be namespaced to.
XA
andYA
๐ฅ Breaking Changes
importGQLDocumentWithNamespace
they will be namespaced enum Values- Argument types must have
GQLType
instances in
Data.Morpheus.Server
:- removed
subscriptionApp
- changed
webSocketsApp
type toApp e m -> m (ServerApp, e -> m ())
- changed
httpPubApp
type to[e -> m ()] -> App e m -> a -> m b
- removed
โ removed
Stream
fromData.Morpheus.Types
โ removed class
Interpreter
,interpreter
is now just regular function.
interpreter = runApp . deriveApp
Minor Changes
- ๐จ internal refactoring