morpheus-graphql v0.9.0 Release Notes

Release Date: 2020-01-01 // over 4 years ago
  • โž• Added

    • WithOperation constraint for Generic Resolvers (#347) thanks @dandoh

    ๐Ÿ›  Fixed

    ๐Ÿ‘ liftEither support in MutResolver (#351)

    selection of __typename on object und union objects (#337)

    auto inferece of external types in gql document (#343)

    th will generate field m (Type m) if type has an argument

    e.g for this types and DSL

    data Type1 = Type1 { ... }type Type2 m = SomeType mdata Type3 m = Type2 { bla :: m Text } deriving ...
    
    type Query { field1 : Type1! field2 : Type2! field3 : Type3! }
    

    morpheus generates

    data Query m = Query {field1 :: m Type1field2 :: m (Type2 m) field3 :: m (Type3 m)} deriving ...
    

    now you can combine multiple gql documents:

    importDocumentWithNamespace `coreTypes.gql` importDocumentWithNamespace `operations.gql`
    

    ๐Ÿ”„ Changed

    ๐Ÿ‘Œ support of resolver fields m type for the fields without arguments

    data Diety m = Deity {name :: m Text}-- is equal todata Diety m = Deity {name :: () -\> m Text}
    

    template haskell generates m type insead of () -> m type for fields without argument (#334)

    data Diety m = Deity {name :: (Arrow () (m Text)), power :: (Arrow () (m (Maybe Text)))}-- changed todata Diety m = Deity {name :: m Text, power :: m (Maybe Text)}