morpheus-graphql-0.18.0
new Features
server
-
NamedResoplvers
(experimental featuure): typed Haskell approach of providing appollo
like named resolvers, apps with NamedResolvers theoretically can be safelly merged. -
TypeGuards
: as an alternative for interfaces -
TaggedArguments
: support of type level tagged argument definition. for example:Haskell field definition
myField :: Arg "a" Int -> Arg "b" (Maybe Text) -> m Text
will generate GraphQL field
myField(a:Int!, b:String): String!
-
deriving will merge function arguments. for example:
for following data type definitions:
data A = A { a1 :: Text, a2 :: Int} deriving (Show, Generic, GQLType) data B = B {b :: Text} deriving (Show, Generic, GQLType)
Haskell field definition
myField :: A -> B -> m Text
will generate GraphQL field
myField(a1:String!, a2:Int!, b:String!): String!
Breaking Changes
server
- non object variants constructors will be also unpacked
- removed
implements
field fromGQLType
- removed
interface
fromMorpheus.Types
- deprecated kind
INTERFACE
Minor Changes
core
- GraphQL errors support additional field
extensions :: Maybe Value
- the parser reports invalid empty selection sets
- The parser is compliant with the GQL specification and supports all valid characters #581
- The parser performance improvement: on average 3-4 times faster, in some cases more than 100 times faster.
client
-
Add defineBy*File' variants that take a
Q FilePath
#584 -
fixed: Generation of data constructors for non-capitalized enums
-
fixed invalid scalar type generation and added tests to ensure their validity for each upcoming version #583
-
return all response errors gracefully as a Left when fetching #577 - Thanks @AlistairB