Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit 3d0a80e

Browse files
committed
Fixes #342
1 parent 517d5dd commit 3d0a80e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

adapter/protobuf/src/Mu/Quasi/GRpc.hs

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import GHC.TypeLits
1818
import Language.Haskell.TH
1919
import Language.ProtocolBuffers.Parser
2020
import qualified Language.ProtocolBuffers.Types as P
21-
import Network.HTTP.Client
22-
import Servant.Client.Core.BaseUrl
2321

2422
import Mu.Quasi.ProtoBuf
2523
import Mu.Rpc

graphql/mu-graphql.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: mu-graphql
2-
version: 0.5.0.3
2+
version: 0.5.0.4
33
synopsis: GraphQL support for Mu
44
description: GraphQL servers and clients for Mu-Haskell
55
cabal-version: >=1.10

graphql/src/Mu/GraphQL/Query/Introspection.hs

+7-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import Data.Int (Int32)
1818
import Data.Maybe (catMaybes, fromMaybe)
1919
import Data.Proxy
2020
import qualified Data.Text as T
21+
import Data.UUID (UUID)
2122
import GHC.TypeLits
2223
import Mu.Rpc
2324
import qualified Mu.Schema as Mu
@@ -67,21 +68,21 @@ data TypeKind
6768
= SCALAR
6869
| OBJECT
6970
| INTERFACE
70-
| UNION
71+
| UNION
7172
| ENUM
7273
| INPUT_OBJECT
7374
| LIST
7475
| NON_NULL
7576
deriving Show
7677

7778
tSimple :: T.Text -> Type
78-
tSimple t = Type SCALAR (Just t) [] [] [] Nothing
79+
tSimple t = Type SCALAR (Just t) [] [] [] Nothing
7980

8081
tList :: Type -> Type
8182
tList = Type LIST Nothing [] [] [] . Just
8283

8384
tNonNull :: Type -> Type
84-
tNonNull = Type NON_NULL Nothing [] [] [] . Just
85+
tNonNull = Type NON_NULL Nothing [] [] [] . Just
8586

8687
unwrapNonNull :: Type -> Maybe Type
8788
unwrapNonNull (Type NON_NULL _ _ _ _ x) = x
@@ -188,7 +189,7 @@ instance ( KnownSymbol sname, KnownSymbols elts
188189
introspectServices _ psub = do
189190
let name = T.pack $ symbolVal (Proxy @sname)
190191
tys = map tSimple (symbolsVal (Proxy @elts))
191-
t = Type UNION (Just name) [] [] tys Nothing
192+
t = Type UNION (Just name) [] [] tys Nothing
192193
-- add this one to the mix
193194
tell (HM.singleton name t)
194195
-- continue with the rest
@@ -281,6 +282,8 @@ instance IntrospectTypeRef ('PrimitiveRef JSON.Value) where
281282
introspectTypeRef _ _ = pure $ tNonNull $ tSimple "JSON"
282283
instance IntrospectTypeRef ('PrimitiveRef JSON.Object) where
283284
introspectTypeRef _ _ = pure $ tNonNull $ tSimple "JSONObject"
285+
instance IntrospectTypeRef ('PrimitiveRef UUID) where
286+
introspectTypeRef _ _ = pure $ tNonNull $ tSimple "UUID"
284287

285288
instance (IntrospectTypeRef r)
286289
=> IntrospectTypeRef ('ListRef r) where

0 commit comments

Comments
 (0)