Changelog for morpheus-graphql-0.15.0

Changelog

0.15.0 - 12.09.2020

new features

Breaking Changes

Minor Changes

0.14.1 - 16.08.2020

0.14.0 - 15.08.2020

new features

import Morpheus.Graphql.Server(compileTimeSchemaValidation)

_validateSchema :: ()
_validateSchema = $(compileTimeSchemaValidation (Identity gqlRoot))

Breaking Changes

data Subscription (m :: * -> *) = Subscription
{ newDeity :: SubscriptionField (m Deity),
  newHuman :: HumanArgs -> SubscriptionField (m Human)
}
deriving (Generic)
resolveNewAddress :: SubscriptionField (ResolverS EVENT IO Address)
resolveNewAddress = subscribe ADDRESS $ do
    -- executed only once
    -- immediate response on failures
    requireAuthorized
    pure $ \(Event _ content) -> do
        -- executes on every event
        lift (getDBAddress content)

0.13.0 - 22.06.2020

breaking changes

new features

0.12.0 - 21.05.2020

Breaking Changes

Package was extracted as:

deprecated:

New Feature

-- if we have record and regular Int
data Object m = Object { field :: m Int }

-- we can write
-- handles kind : (* -> *) -> *
resolveObject :: ResolverO o EVENT IO Object
-- is alias to: Resolver o () IO (Object (Resolver o () IO))
-- or
-- handles kind : *
resolveInt :: ResolverO o EVENT IO Int
-- is alias to: Resolver o () IO Int

the resolvers : ResolverQ , ResolverM, ResolverS , are like ResolverO but with QUERY , MUTATION and SUBSCRIPTION as argument.

minor

0.11.0 - 01.05.2020

Breaking Changes

New features

minor

0.10.0 - 07.01.2020

Breaking Changes

New features

minor

[0.9.1] - 02.01.2020

[0.9.0] - 02.01.2020

Added

Fixed

Changed

[0.8.0] - 15.12.2019

Changed

Added


data Realm  =
    Sky
  | Sea
  | Underworld
    deriving (Generic, GQLType)

data Deity  = Deity{
    fullName:: Text,
    realm:: Realm
  } deriving (Generic, GQLType)

data Character  =
    CharacterDeity Deity -- Only <tyConName><conName> should generate direct link
  -- RECORDS
  | Creature { creatureName :: Text, creatureAge :: Int }
  --- Types
  | SomeDeity Deity
  | CharacterInt Int
  | SomeMulti Int Text
  --- ENUMS
  | Zeus
  | Cronus deriving (Generic, GQLType)


will generate schema:

enum Realm {
  Sky
  Sea
  Underworld
}

type Deity {
  fullName: String!
  realm: Realm!
}

union Character =
    Deity
  | Creature
  | SomeDeity
  | CharacterInt
  | SomeMulti
  | CharacterEnumObject

type Creature {
  creatureName: String!
  creatureAge: Int!
}

type SomeDeity {
  _0: Deity!
}

type CharacterInt {
  _0: Int!
}

type SomeMulti {
  _0: Int!
  _1: String!
}

# enum
type CharacterEnumObject {
  enum: CharacterEnum!
}

enum CharacterEnum {
  Zeus
  Cronus
}

rules:

Removed

Fixed

[0.7.1] - 26.11.2019

[0.7.0] - 24.11.2019

Removed

Changed

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

Fixed

[0.6.2] - 2.11.2019

Added

[0.6.0] - 1.11.2019

Removed

Added

[0.5.0] - 31.10.2019

Added

Fixed

Changed

[0.4.0] - 09.10.2019

Changed

Fixed:

[0.3.1] - 05.10.2019

Changed

[0.3.0] - 04.10.2019

Added

Fixed

Changed

[0.2.2] - 30.08.2019

Fixed

[0.2.1] - 23.08.2019

[0.2.0] - 23.08.2019

Added

Fixed:

Changed

[0.1.1] - 1.07.2019

Fixed:

[0.1.0] - 30.06.2019

thanks for contributing to: @krisajenkins, @hovind, @vmchale, @msvbg

Added

Changed

Fixed:

Removed