File tree 1 file changed +17
-0
lines changed
server/src-lib/Hasura/GraphQL/Schema
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,23 @@ type TableArgs = RQL.TableArgsG UnpreparedValue
24
24
type TablePerms = RQL. TablePermG UnpreparedValue
25
25
26
26
27
+
28
+ queryExp
29
+ :: forall m n . (MonadSchema n m , MonadError QErr m )
30
+ => HashSet QualifiedTable
31
+ -> Bool
32
+ -> m (Parser 'Output n (HashMap G. Name SelectExp ))
33
+ queryExp allTables stringifyNum = do
34
+ selectExpParsers <- for (toList allTables) $ \ tableName -> do
35
+ tablePermissions <- tablePerms tableName
36
+ for tablePermissions $ \ perms ->
37
+ selectExp tableName perms stringifyNum
38
+ let queryFieldsParser = fmap (Map. fromList . catMaybes) $ sequenceA $ catMaybes selectExpParsers
39
+ pure $ P. selectionSet $$ (G. litName " Query" ) Nothing queryFieldsParser
40
+
41
+
42
+
43
+
27
44
selectExp
28
45
:: forall m n . (MonadSchema n m , MonadError QErr m )
29
46
=> QualifiedTable
You can’t perform that action at this time.
0 commit comments