morpheus-graphql v0.7.0 Release Notes
Release Date: 2019-11-23 // over 4 years ago-
โ Removed
toMorpheusHaskellAPi
fromData.Morpheus.Document
functionality will be migrated inmorpheus-graphql-cli
๐ Changed
liftM
toMonadTrans
instance methodlift
liftEitherM
toliftEither
Resolver operation m event value
->Resolver operation event m value
, monad trans needs that last 2 type arguments are monad and value that why it was necessary๐ฆ exposed
Data.Morpheus.Types.Internal.AST
Mutation Resolver was changed from
resolver :: () -> ResolveM EVENT IO Address resolver = MutResolver { mutEvents = [someEventForSubscription], mutResolver = lift setDBAddress }
-- Mutation Wit Event Triggering : sends events to subscription resolver :: () -> ResolveM EVENT IO Address resolver = MutResolver \$ do value <- lift setDBAddress pure ([someEventForSubscription], value) -- or -- Mutation Without Event Triggering resolver :: () -> ResolveM EVENT IO Address resolver _args = lift setDBAddress
โ Added
โ added
parseDSL
toData.Morpheus.Document
๐ GraphQL SDL support fully supports descriptions: onTypes, fields , args ... with (enums, inputObjects , union, object) for example :
""" Description for Type Address """ type Address { """ Description for Field city """ city: String! street( """ Description argument id """ id: ID! ): Int! }
###### GraphQL SDL
type User { name: String! @deprecated(reason: "some reason") }
will displayed in introspection
###### introspection.json
{ "data": { "__type": { "fields": [ { "name": "city", "isDeprecated": true, "deprecationReason": "test deprecation field with reason" } ] } } }
๐ basic support of directive
@deprecated
onenumValue
and objectfield
, only on introspection๐ GraphQL Client deprecation warnings
on type
type Human { humanName: String! lifetime: Lifetime! @deprecated(reason: "some reason") profession: Profession }
compiler output:
warning: Morpheus Client Warning: { "message":"the field \"Human.lifetime\" is deprecated. some reason", "locations":[{"line":24,"column":15}] }
๐ new helper resolver types aliases:
- ResolveQ : for Query
- ResolveM : for Mutation
- ResolveS : for Subscription
ResolveM EVENT IO Address
is same asMutRes EVENT IO (Address (MutRes EVENT IO))
is helpfull wenn you want to resolve GraphQL object
๐ Fixed
- โ added missing Monad instance for Mutation resolver
defineByIntrospectionFile
does not breaks if schema contains interfaces- ๐ Morpheus Client supports
Subscription
andMutation
operations