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 and deriveApp
      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 exposes typeOptions 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 Values

    • with importGQLDocumentWithNamespace now you can use Enums with Colliding Values:

      enum X {
        A
      }
    
      enum Y {
        A
      }
    

    they will be namespaced to. XA and YA

    ๐Ÿ’ฅ Breaking Changes

    • importGQLDocumentWithNamespace they will be namespaced enum Values
    • Argument types must have GQLType instances
    • in Data.Morpheus.Server:

      • removed subscriptionApp
      • changed webSocketsApp type to App e m -> m (ServerApp, e -> m ())
      • changed httpPubApp type to [e -> m ()] -> App e m -> a -> m b
    • โœ‚ removed Stream from Data.Morpheus.Types

    • โœ‚ removed class Interpreter, interpreter is now just regular function.

      interpreter = runApp . deriveApp
    

    Minor Changes

    • ๐Ÿ”จ internal refactoring