diff --git a/adapter/protobuf/src/Mu/Quasi/GRpc.hs b/adapter/protobuf/src/Mu/Quasi/GRpc.hs index d099a8e..15e76bc 100644 --- a/adapter/protobuf/src/Mu/Quasi/GRpc.hs +++ b/adapter/protobuf/src/Mu/Quasi/GRpc.hs @@ -18,8 +18,6 @@ import GHC.TypeLits import Language.Haskell.TH import Language.ProtocolBuffers.Parser import qualified Language.ProtocolBuffers.Types as P -import Network.HTTP.Client -import Servant.Client.Core.BaseUrl import Mu.Quasi.ProtoBuf import Mu.Rpc diff --git a/graphql/mu-graphql.cabal b/graphql/mu-graphql.cabal index ce9776b..9f746ee 100644 --- a/graphql/mu-graphql.cabal +++ b/graphql/mu-graphql.cabal @@ -1,5 +1,5 @@ name: mu-graphql -version: 0.5.0.3 +version: 0.5.0.4 synopsis: GraphQL support for Mu description: GraphQL servers and clients for Mu-Haskell cabal-version: >=1.10 diff --git a/graphql/src/Mu/GraphQL/Query/Introspection.hs b/graphql/src/Mu/GraphQL/Query/Introspection.hs index c11ed14..b123e29 100644 --- a/graphql/src/Mu/GraphQL/Query/Introspection.hs +++ b/graphql/src/Mu/GraphQL/Query/Introspection.hs @@ -18,6 +18,7 @@ import Data.Int (Int32) import Data.Maybe (catMaybes, fromMaybe) import Data.Proxy import qualified Data.Text as T +import Data.UUID (UUID) import GHC.TypeLits import Mu.Rpc import qualified Mu.Schema as Mu @@ -67,7 +68,7 @@ data TypeKind = SCALAR | OBJECT | INTERFACE - | UNION + | UNION | ENUM | INPUT_OBJECT | LIST @@ -75,13 +76,13 @@ data TypeKind deriving Show tSimple :: T.Text -> Type -tSimple t = Type SCALAR (Just t) [] [] [] Nothing +tSimple t = Type SCALAR (Just t) [] [] [] Nothing tList :: Type -> Type tList = Type LIST Nothing [] [] [] . Just tNonNull :: Type -> Type -tNonNull = Type NON_NULL Nothing [] [] [] . Just +tNonNull = Type NON_NULL Nothing [] [] [] . Just unwrapNonNull :: Type -> Maybe Type unwrapNonNull (Type NON_NULL _ _ _ _ x) = x @@ -188,7 +189,7 @@ instance ( KnownSymbol sname, KnownSymbols elts introspectServices _ psub = do let name = T.pack $ symbolVal (Proxy @sname) tys = map tSimple (symbolsVal (Proxy @elts)) - t = Type UNION (Just name) [] [] tys Nothing + t = Type UNION (Just name) [] [] tys Nothing -- add this one to the mix tell (HM.singleton name t) -- continue with the rest @@ -281,6 +282,8 @@ instance IntrospectTypeRef ('PrimitiveRef JSON.Value) where introspectTypeRef _ _ = pure $ tNonNull $ tSimple "JSON" instance IntrospectTypeRef ('PrimitiveRef JSON.Object) where introspectTypeRef _ _ = pure $ tNonNull $ tSimple "JSONObject" +instance IntrospectTypeRef ('PrimitiveRef UUID) where + introspectTypeRef _ _ = pure $ tNonNull $ tSimple "UUID" instance (IntrospectTypeRef r) => IntrospectTypeRef ('ListRef r) where