summaryrefslogtreecommitdiff
path: root/src/Data/Morpheus/Execution/Server/Resolve.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Morpheus/Execution/Server/Resolve.hs')
-rw-r--r--src/Data/Morpheus/Execution/Server/Resolve.hs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/Data/Morpheus/Execution/Server/Resolve.hs b/src/Data/Morpheus/Execution/Server/Resolve.hs
index fb3bbb3..c0aca8d 100644
--- a/src/Data/Morpheus/Execution/Server/Resolve.hs
+++ b/src/Data/Morpheus/Execution/Server/Resolve.hs
@@ -26,9 +26,10 @@ import Data.Proxy (Proxy (..)
-- MORPHEUS
import Data.Morpheus.Error.Utils (badRequestError, renderErrors)
+import Data.Morpheus.Execution.Internal.GraphScanner (resolveUpdates)
import Data.Morpheus.Execution.Server.Encode (EncodeCon, EncodeMutCon, EncodeSubCon, OBJ_RES,
encodeOperation, encodeQuery)
-import Data.Morpheus.Execution.Server.Introspect (IntroCon, ObjectFields (..), resolveTypes)
+import Data.Morpheus.Execution.Server.Introspect (IntroCon, ObjectFields (..))
import Data.Morpheus.Execution.Subscription.ClientRegister (GQLState, publishUpdates)
import Data.Morpheus.Parsing.Request.Parser (parseGQL)
import Data.Morpheus.Schema.Schema (Root)
@@ -138,15 +139,16 @@ fullSchema ::
-> Validation DataTypeLib
fullSchema _ = querySchema >>= mutationSchema >>= subscriptionSchema
where
- querySchema = resolveTypes (initTypeLib (operatorType (hiddenRootFields ++ fields) "Query")) (defaultTypes : types)
+ querySchema =
+ resolveUpdates (initTypeLib (operatorType (hiddenRootFields ++ fields) "Query")) (defaultTypes : types)
where
(fields, types) = objectFields (Proxy @(CUSTOM query)) (Proxy @query)
------------------------------
- mutationSchema lib = resolveTypes (lib {mutation = maybeOperator fields "Mutation"}) types
+ mutationSchema lib = resolveUpdates (lib {mutation = maybeOperator fields "Mutation"}) types
where
(fields, types) = objectFields (Proxy @(CUSTOM mutation)) (Proxy @mutation)
------------------------------
- subscriptionSchema lib = resolveTypes (lib {subscription = maybeOperator fields "Subscription"}) types
+ subscriptionSchema lib = resolveUpdates (lib {subscription = maybeOperator fields "Subscription"}) types
where
(fields, types) = objectFields (Proxy @(CUSTOM subscription)) (Proxy @subscription)
-- maybeOperator :: [a] -> Text -> Maybe (Text, DataTyCon[a])
@@ -155,10 +157,4 @@ fullSchema _ = querySchema >>= mutationSchema >>= subscriptionSchema
-- operatorType :: [a] -> Text -> (Text, DataTyCon[a])
operatorType typeData typeName =
( typeName
- , DataTyCon
- { typeData
- , typeVisibility = True
- , typeName
- , typeFingerprint = SystemFingerprint typeName
- , typeDescription = Nothing
- })
+ , DataTyCon {typeData, typeName, typeFingerprint = SystemFingerprint typeName, typeDescription = Nothing})