morpheus-graphql-0.1.0
Pre-release
Pre-release
thanks for contributing to: @krisajenkins, @hovind, @vmchale, @msvbg
Added
- support for Union Types:
type instance KIND <type> = UNION
- support of haskell Types:
Map
,Set
, and Pair(a,b)
- GraphQL Resolver supports custom Monad
- add
Interpreter
class with instances:ByteString -> m ByteString
and LazyByteString
, wherem
is resolver monadText -> m Text
and LazyText
, wherem
is resolver monadGQLRequest -> m GQLResponse
, When you using it inside another Component that have ManualToJSON
deriving,
you have to ensure thatGQLResponse
will be encoded withtoEncoding
, and not withtoJSON
.
- Schema Validation:
- Name Collision
- support of Parsing input values:
Objects
,Arrays
- support scalar type:
ID
- scalar Types are validated by
GQLScalar
instance functionparseValue
- TypeFamily
KIND
with:SCALAR
OBJECT
,ENUM
INPUT_OBJECT
UNION
- inline Fragments
- GraphQL Aliases
- Subscriptions:
GQLSubscription
a -> EffectM b
operation: is resolver that contains side effect inEffectM
.
is used for Mutation and Subscribe communicationgqlEffectResolver ["CHANNEL_ID"]
: packs as effect Resolver.
if mutation and subscription resolver have same channel then
every call of mutation will trigger subscription resolverGQLState
: shared state betweenhttp
andwebsocket
servergqlSocketApp
:convertsinterpreter
towebsocket
applicationgraphql-subscriptions
:Apollo GraphQL
subProtocol
- language:
- Query supports :
__type(name:"type")
- On every Object can be selected :
__typename
- Query supports :
Changed
GQLRootResolver
,GQLType(..)
,GQLScalar(..)
are moved inData.Morpheus.Types
GQLRoot { query, mutation, subscription }
toGQLRootResolver {queryResolver, mutationResolver, subscriptionResolver}
interpreter
: can be used inhttp
andwebsocket
serverGQLKind
renamed asGQLType
- types can be derived just with
(Generic,GQLType)
- haskell record field
type'
will generate GQL Object fieldtype
- public API (all other modules are hidden):
- Data.Morpheus
- Data.Morpheus.Kind
- Data.Morpheus.Types
- Data.Morpheus.Server
Fixed:
- parser can read fields with digits like: a1 , _1
- you can use Wrapped type and Wrapped Primitive Types issue #136:
- wrapped TypesNames will be separated with "_" : typeName(Either A B) -> "Either_A_B"
- introspection:
- argument supports
Non-Null
andList
- every field has correct kind
- argument supports
Removed
GQLArgs
: you can derive arguments just withGeneric
withoutGQLArgs
GQLObject
: replaced with instancetype instance KIND <Type> = OBJECT
GQLEnum
: replaced with instancetype instance KIND <Type> = ENUM
GQLInput
: replaced with instancetype instance KIND <Type> = INPUT_OBJECT
Typeable
: with new deriving it is not required anymoreWrapper
: with TypeFamilies there is no need forWrapper
a ::-> b
is Replaced bya -> ResM b
whereResM
is alias forResolver IO a
GQLMutation
,GQLQuery
: with new deriving it is not required anymoreResolver
constructor replaced by functions:gqlResolver
: packsm Either String a
toResolver m a
gqlEffectResolver
: resolver constructor for effectedResolverliftEffectResolver
: lifts normal resolver to Effect Resolver.