morpheus-graphql v0.8.1 Release Notes

  • ๐Ÿ›  Fixed

    • 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 m
      data Type3 m = Type2 { bla :: m Text } deriving ...
    
      type Query {
        field1 : Type1!
        field2 : Type2!
        field3 : Type3!
      }
    

    morpheus generates

      data Query m = Query {
        field1 :: m Type1
        field2 :: 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 to
      data 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 to
      data Diety m = Deity {
          name :: m Text,
          power :: m (Maybe Text)
      }