morpheus-graphql-0.5.0
Pre-releaseAdded
- dummy support of
directives
, only parsing not actual implementation
Fixed
-
can be parsed
implements
with multiple interfaces separated by&
-
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 typeBoolean
to haskellBool
and GQLString
toText
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 withUndefined
inGQLRootResolver
for empty operationsmutation
,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 GADTResolver