morpheus-graphql v0.5.0 Release Notes

Release Date: 2019-10-31 // over 4 years ago
  • โž• Added

    • ๐Ÿ“œ dummy support of directives, only parsing not actual implementation

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ can be parsed implements with multiple interfaces separated by &
    • 0๏ธโƒฃ can be parsed default value on inputobject
    • ๐Ÿ“œ Parser supports anonymous Operation: query , mutation , subscription for example:
      mutation {
         name
      }
    
    • Morpheus client does not breaks on Boolean type, converts every GraphQL type Boolean to haskell Bool and GQL String to Text

    ๐Ÿ”„ Changed

    • โฌ‡๏ธ Reduced GQLRootResolver signature :

    GQLRootResolver IO () () Query () () -> GQLRootResolver IO () Query () ()

    GQLRootResolver IO Channel Content Query Mutation Subscription -> GQLRootResolver IO APIEvent Query Mutation Subscription

    where APIEvent = Event Channel Content

    • GQLRootResolver automatically assigns corresponding monad to GraphQL Types.

    you can write just:

      GQLRootResolver IO APIEvent Query  Mutation Subscription
    

    instead of:

      GQLRootResolver IO APIEvent (Query (Resolver IO))  (Mutation (MutResolver IO ApiEvent) (Subscription (SubResolver IO ApiEvent))
    

    where operations are generated by importGQLDocument or have form :

      data Query m = Query {
        field1 :: Args -> m Field1,
        ....
      }
    
    • () was replaced with Undefined in GQLRootResolver for empty operations mutation, subscription rootResolver :: GQLRootResolver IO () Query Undefined Undefined
    • Root Operations Query, Mutation, Subscription are passed to root resolvers without boxing inside a monad.
    • there are only 3 kind of resolvers MutResolver, SubResolver , QueryResolver defined by GADT Resolver