packages feed

morpheus-graphql-code-gen 0.28.4 → 0.28.5

raw patch · 4 files changed

+20/−15 lines, 4 filesdep ~prettyprinterdep ~reludesetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: prettyprinter, relude

API changes (from Hackage documentation)

Files

+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
morpheus-graphql-code-gen.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.38.1.+-- This file has been generated from package.yaml by hpack version 0.36.1. -- -- see: https://github.com/sol/hpack  name:           morpheus-graphql-code-gen-version:        0.28.4+version:        0.28.5 synopsis:       Morpheus GraphQL CLI description:    code generator for Morpheus GraphQL category:       web, graphql, cli@@ -47,8 +47,8 @@     , morpheus-graphql-code-gen-utils >=0.28.0 && <0.29.0     , morpheus-graphql-core >=0.28.0 && <0.29.0     , morpheus-graphql-server >=0.28.0 && <0.29.0-    , prettyprinter >=1.7.0 && <2.0.0-    , relude >=0.3.0 && <2.0.0+    , prettyprinter >=1.2.1 && <2.0.0+    , relude >=0.1.1 && <2.0.0     , template-haskell >=2.0.0 && <3.0.0     , text >=1.2.3 && <3.0.0     , unordered-containers >=0.2.8 && <1.0.0@@ -78,8 +78,8 @@     , morpheus-graphql-core >=0.28.0 && <0.29.0     , morpheus-graphql-server >=0.28.0 && <0.29.0     , optparse-applicative >=0.12.0 && <1.0.0-    , prettyprinter >=1.7.0 && <2.0.0-    , relude >=0.3.0 && <2.0.0+    , prettyprinter >=1.2.1 && <2.0.0+    , relude >=0.1.1 && <2.0.0     , template-haskell >=2.0.0 && <3.0.0     , text >=1.2.3 && <3.0.0     , unordered-containers >=0.2.8 && <1.0.0
src/Data/Morpheus/CodeGen/Server/Internal/AST.hs view
@@ -84,7 +84,7 @@   = TypeDirectiveUsage TypeValue   | FieldDirectiveUsage FieldName TypeValue   | EnumDirectiveUsage TypeName TypeValue-  deriving (Show)+  deriving (Eq, Show)  instance PrintExp ServerDirectiveUsage where   printExp (TypeDirectiveUsage x) = appE (varE 'typeDirective) (printExp x)@@ -101,14 +101,14 @@     gqlKind :: Kind,     gqlTypeDirectiveUses :: [ServerDirectiveUsage]   }-  deriving (Show)+  deriving (Eq, Show)  data InterfaceDefinition = InterfaceDefinition   { aliasName :: TypeName,     interfaceName :: TypeName,     unionName :: TypeName   }-  deriving (Show)+  deriving (Eq, Show)  instance PrintDec InterfaceDefinition where   printDec InterfaceDefinition {..} =@@ -125,7 +125,7 @@   { directiveTypeName :: CodeGenTypeName,     directiveLocations :: [DirectiveLocation]   }-  deriving (Show)+  deriving (Eq, Show)  data ServerDeclaration   = GQLTypeInstance Kind (TypeClassInstance ServerMethod)@@ -133,7 +133,7 @@   | DataType CodeGenType   | ScalarType {scalarTypeName :: Text}   | InterfaceType InterfaceDefinition-  deriving (Show)+  deriving (Eq, Show)  instance Pretty ServerDeclaration where   pretty (InterfaceType InterfaceDefinition {..}) =@@ -144,7 +144,7 @@       <+> "TypeGuard"       <+> unpack (print interfaceName .<> "m")       <+> unpack (print unionName .<> "m")-      <> line+        <> line   pretty ScalarType {} = ""   pretty (DataType cgType) = pretty cgType   pretty (GQLTypeInstance kind gql)@@ -157,7 +157,7 @@ data ServerMethod   = ServerMethodDefaultValues (Map Text (Value CONST))   | ServerMethodDirectives [ServerDirectiveUsage]-  deriving (Show)+  deriving (Eq, Show)  instance Pretty ServerMethod where   pretty (ServerMethodDefaultValues x) = pretty (show x)
src/Data/Morpheus/CodeGen/Server/Interpreting/Transform.hs view
@@ -15,6 +15,7 @@ where  import Data.ByteString.Lazy.Char8 (ByteString)+import Data.List (nub) import Data.Morpheus.CodeGen.Internal.AST   ( AssociatedType (..),     CodeGenConstructor (..),@@ -100,7 +101,9 @@ parseServerTypeDefinitions ctx txt =   case parseDefinitions txt of     Failure errors -> fail (renderGQLErrors errors)-    Success {result, warnings} -> printWarnings warnings >> toTHDefinitions (namespace ctx) result+    Success {result, warnings} -> do+        printWarnings warnings+        first nub <$> toTHDefinitions (namespace ctx) result  getExternals :: [ServerDeclaration] -> Flags getExternals xs =@@ -294,7 +297,7 @@         assoc = [(''KIND, AssociatedTypeName (toName gqlKind))],         typeClassMethods =           [ ('directives, ProxyArgument, ServerMethodDirectives gqlTypeDirectiveUses)-            | not (null gqlTypeDirectiveUses)+          | not (null gqlTypeDirectiveUses)           ]       }