Changelog for morpheus-graphql-0.2.2
[0.2.2] - 30.08.2019
Fixed
- 
Parser Supports GraphQL multiline comments 
- 
Morpheus GraphQL Client: Support GraphQL Alias 
- 
Support of GraphQL Interfaces on GraphQL Document: # simple.gql interface Node { nodeId: ID! } type SimpleType implements Node { nodeId: ID! name: String! }morpheus compiler will read interfaces and validate implements. template haskell will generate haskell types only for types not for interfaces. haskell type from simple.gql:data SimpleType = SimpleType { nodeId :: ID! name :: Text! } deriving (Generic)at the time compiler does not validates field Arguments by interface 
[0.2.1] - 23.08.2019
- assets are added to cabal source files
[0.2.0] - 23.08.2019
Added
- 
Parser Supports GraphQL comments 
- 
Enhanced Subscription: mutation can trigger subscription with arguments 
- 
Experimental Support of Input Unions 
- 
GraphQL schema generating with: Data.Morpheus.Document.toGraphQLDocument
- 
Generating dummy Morpheus Api from schema.gql:morpheus build schema/mythology.gql src/MythologyApi.hs
- 
convertToJSONName&convertToHaskellNamehas been extended to support all Haskell 2010 reserved identities. details
- 
GraphQL Clientwith Template haskell QuasiQuotes (Experimental, Not fully Implemented)defineQuery [gql| query GetHero ($byRealm: Realm) { deity (realm:$byRealm) { power fullName } } |]will Generate: - response type GetHero,DeitywithLensInstances
- input types: GetHeroArgs,Realm
- instance for FetchtypeClass
 so that fetchHero :: Args GetHero -> m (Either String GetHero) fetchHero = fetch jsonRes args where args = GetHeroArgs {byRealm = Just Realm {owner = "Zeus", surface = Just 10}} jsonRes :: ByteString -> m ByteString jsonRes = <fetch query from server>resolves well typed response GetHero.
- response type 
- 
Ability to define GQLSchemawith GraphQL syntax , so that with this schema[gqlDocument| type Query { deity (uid: Text! ) : Deity! } type Deity { name : Text! power : Text } |] rootResolver :: GQLRootResolver IO () () Query () () rootResolver = GQLRootResolver {queryResolver = return Query {deity}, mutationResolver = pure (), subscriptionResolver = pure ()} where deity DeityArgs {uid} = pure Deity {name, power} where name _ = pure "Morpheus" power _ = pure (Just "Shapeshifting")Template Haskell Generates types: Query,Deity,DeityArgs, that can be used byrootResolvergenerated types are not compatible with Mutation,Subscription, they can be used only inQuery, but this issue will be fixed in next release
Fixed:
- Parser supports enums inside input Object
- fulfilled fragment Validation (added: unusedFragment,nameConflict)
- correct decoding of Enums with more than 3 constructor #201
Changed
- 
WebSocket subProtocol changed from graphql-subscriptionstographql-ws
- 
type familiy KINDis moved into typeClassesGQLType, so you should replacetype instance KIND Deity = OBJECT instance GQLType Deity where description = const "Custom Description for Client Defined User Type" data Deity = Deity { fullName :: Text } deriving (Generic)with instance GQLType Deity where type KIND Deity = OBJECT description = const "Custom Description for Client Defined User Type" data Deity = Deity { fullName :: Text } deriving (Generic)
- 
Duplicated variable names in Http requests are validated using Aeson'sjsonNoDupfunction. So the following request will result in a parsing error{"query":"...", "variables":{"email":"foo@mail.net", "email":"bar@mail.net",...}}
[0.1.1] - 1.07.2019
Fixed:
- () as Subscription or Mutation does not defines Operator without fields
[0.1.0] - 30.06.2019
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 Interpreterclass with instances:- ByteString -> m ByteStringand Lazy- ByteString, where- mis resolver monad
- Text -> m Textand Lazy- Text, where- mis resolver monad
- GQLRequest -> m GQLResponse, When you using it inside another Component that have Manual- ToJSONderiving, you have to ensure that- GQLResponsewill be encoded with- toEncoding, and not with- toJSON.
 
- 
Schema Validation: - Name Collision
 
- 
support of Parsing input values: Objects,Arrays
- 
support scalar type: ID
- 
scalar Types are validated by GQLScalarinstance functionparseValue
- 
TypeFamily KINDwith:- SCALAR
- OBJECT,
- ENUM
- INPUT_OBJECT
- UNION
 
- 
inline Fragments 
- 
GraphQL Aliases 
- 
Subscriptions: GQLSubscription- a -> EffectM boperation: is resolver that contains side effect in- EffectM. is used for Mutation and Subscribe communication
- gqlEffectResolver ["CHANNEL_ID"]: packs as effect Resolver. if mutation and subscription resolver have same channel then every call of mutation will trigger subscription resolver
- GQLState: shared state between- httpand- websocketserver
- gqlSocketApp:converts- interpreterto- websocketapplication
- graphql-subscriptions:- Apollo GraphQLsubProtocol
 
- 
language: - Query supports : __type(name:"type")
- On every Object can be selected : __typename
 
- Query supports : 
Changed
- GQLRootResolver,- GQLType(..),- GQLScalar(..)are moved in- Data.Morpheus.Types
- GQLRoot { query, mutation, subscription }to- GQLRootResolver {queryResolver, mutationResolver, subscriptionResolver}
- interpreter: can be used in- httpand- websocketserver
- GQLKindrenamed as- GQLType
- 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.Execution.Subscription
 
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-NullandList
- every field has correct kind
 
- argument supports 
Removed
- GQLArgs: you can derive arguments just with- Genericwithout- GQLArgs
- GQLObject: replaced with instance- type instance KIND <Type> = OBJECT
- GQLEnum: replaced with instance- type instance KIND <Type> = ENUM
- GQLInput: replaced with instance- type instance KIND <Type> = INPUT_OBJECT
- Typeable: with new deriving it is not required anymore
- Wrapper: with TypeFamilies there is no need for- Wrapper
- a ::-> bis Replaced by- a -> ResM bwhere- ResMis alias for- Resolver IO a
- GQLMutation,- GQLQuery: with new deriving it is not required anymore
- Resolverconstructor replaced by functions:- gqlResolver: packs- m Either String ato- Resolver m a
- gqlEffectResolver: resolver constructor for effectedResolver
- liftEffectResolver: lifts normal resolver to Effect Resolver.