@@ -18,6 +18,7 @@ import Data.Int (Int32)
18
18
import Data.Maybe (catMaybes , fromMaybe )
19
19
import Data.Proxy
20
20
import qualified Data.Text as T
21
+ import Data.UUID (UUID )
21
22
import GHC.TypeLits
22
23
import Mu.Rpc
23
24
import qualified Mu.Schema as Mu
@@ -67,21 +68,21 @@ data TypeKind
67
68
= SCALAR
68
69
| OBJECT
69
70
| INTERFACE
70
- | UNION
71
+ | UNION
71
72
| ENUM
72
73
| INPUT_OBJECT
73
74
| LIST
74
75
| NON_NULL
75
76
deriving Show
76
77
77
78
tSimple :: T. Text -> Type
78
- tSimple t = Type SCALAR (Just t) [] [] [] Nothing
79
+ tSimple t = Type SCALAR (Just t) [] [] [] Nothing
79
80
80
81
tList :: Type -> Type
81
82
tList = Type LIST Nothing [] [] [] . Just
82
83
83
84
tNonNull :: Type -> Type
84
- tNonNull = Type NON_NULL Nothing [] [] [] . Just
85
+ tNonNull = Type NON_NULL Nothing [] [] [] . Just
85
86
86
87
unwrapNonNull :: Type -> Maybe Type
87
88
unwrapNonNull (Type NON_NULL _ _ _ _ x) = x
@@ -188,7 +189,7 @@ instance ( KnownSymbol sname, KnownSymbols elts
188
189
introspectServices _ psub = do
189
190
let name = T. pack $ symbolVal (Proxy @ sname )
190
191
tys = map tSimple (symbolsVal (Proxy @ elts ))
191
- t = Type UNION (Just name) [] [] tys Nothing
192
+ t = Type UNION (Just name) [] [] tys Nothing
192
193
-- add this one to the mix
193
194
tell (HM. singleton name t)
194
195
-- continue with the rest
@@ -281,6 +282,8 @@ instance IntrospectTypeRef ('PrimitiveRef JSON.Value) where
281
282
introspectTypeRef _ _ = pure $ tNonNull $ tSimple " JSON"
282
283
instance IntrospectTypeRef ('PrimitiveRef JSON. Object ) where
283
284
introspectTypeRef _ _ = pure $ tNonNull $ tSimple " JSONObject"
285
+ instance IntrospectTypeRef ('PrimitiveRef UUID ) where
286
+ introspectTypeRef _ _ = pure $ tNonNull $ tSimple " UUID"
284
287
285
288
instance (IntrospectTypeRef r )
286
289
=> IntrospectTypeRef ('ListRef r ) where
0 commit comments