summaryrefslogtreecommitdiff
path: root/src/GraphQL.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphQL.hs')
-rw-r--r--src/GraphQL.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GraphQL.hs b/src/GraphQL.hs
index 5e8eb58..986efb3 100644
--- a/src/GraphQL.hs
+++ b/src/GraphQL.hs
@@ -205,7 +205,9 @@ processQueryStringWithVariables :: String -- ^ This is th
-> [(String,[String])] -- ^ unique server object name to list of database table names (which are exact references to table names).
-> [(String,String,[String])] -- ^ two database table names to list of from-to-and intermediate triplet strings as described above to identify all GraphQL relationships with database sequences.
-> ([RootObject],[[String]]) -- ^ The return value is one tuple with server objects and list with grouped sql query strings.
-processQueryStringWithVariables qry vars svrobjs sss sos sodn sor = checkObjectsToSqlWithVariables sss sos sodn sor (VP.parseVariables vars qry) $ checkStringToObjects svrobjs $ QP.processString qry
+processQueryStringWithVariables qry vars svrobjs sss sos sodn sor = checkObjectsToSqlWithVariables sss sos sodn sor dvars $ checkStringToObjectsWithVariables svrobjs dvars $ QP.processString qry
+ where
+ dvars = VP.parseVariables vars qry
{- |
Except being nested in a monad, this funcion is same as above.
@@ -359,7 +361,7 @@ processQueryStringWithJsonAndVariables :: (MonadIO m)
processQueryStringWithJsonAndVariables qry vars fp = do
(svrobjs,sss,sos,sodn,sor) <- IO.liftIO $ JP.fetchArguments fp
let dvars = VP.parseVariables vars qry
- return $ checkObjectsToSqlWithVariables sss sos sodn sor dvars $ checkStringToObjects svrobjs $ QP.processString qry
+ return $ checkObjectsToSqlWithVariables sss sos sodn sor dvars $ checkStringToObjectsWithVariables svrobjs dvars $ QP.processString qry
{- |
This is the function to call after casting PersistValues to Text from processQueryString of which you may find on my examples <https://github.com/jasonsychau/graphql-w-persistent page>.