mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
This commit is contained in:
parent
9b229651eb
commit
63acd0e7b2
@ -1143,12 +1143,16 @@ input table_<op>_order_by {
|
||||
mkTabAggOpOrdByInpObjs
|
||||
:: QualifiedTable -> [PGCol] -> [PGCol] -> [InpObjTyInfo]
|
||||
mkTabAggOpOrdByInpObjs tn numCols compCols =
|
||||
map (mkInpObjTy numCols) numAggOps <> map (mkInpObjTy compCols) compAggOps
|
||||
mapMaybe (mkInpObjTyM numCols) numAggOps
|
||||
<> mapMaybe (mkInpObjTyM compCols) compAggOps
|
||||
where
|
||||
|
||||
mkDesc (G.Name op) = G.Description $ "order by " <> op <> "() on columns of table " <>> tn
|
||||
|
||||
mkInpObjTyM cols op = bool (Just $ mkInpObjTy cols op) Nothing $ null cols
|
||||
mkInpObjTy cols op = mkHsraInpTyInfo (Just $ mkDesc op) (mkTabAggOpOrdByTy tn op) $
|
||||
fromInpValL $ map mkColInpVal cols
|
||||
|
||||
mkColInpVal c = InpValInfo Nothing (mkColName c) $ G.toGT
|
||||
ordByTy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user