1
Fork 0
mirror of https://github.com/Airsequel/AirGQL.git synced 2025-08-22 22:36:58 +03:00

Mark omittable fields as optional in introspection.

This commit is contained in:
prescientmoon 2024-05-27 12:42:05 +02:00
commit 6cf584e58a

View file

@ -27,6 +27,7 @@ import Protolude (
not, not,
($), ($),
(&), (&),
(&&),
(<&>), (<&>),
(>>=), (>>=),
) )
@ -73,6 +74,7 @@ import AirGQL.Lib (
column_name_gql, column_name_gql,
datatype_gql, datatype_gql,
getColumns, getColumns,
isOmittable,
notnull, notnull,
select_options, select_options,
) )
@ -1217,7 +1219,7 @@ getSchemaFieldOutput dbId conn accessMode tables = do
colName colName
"" -- TODO: Reactivate description when user can specify it "" -- TODO: Reactivate description when user can specify it
[] -- No arguments [] -- No arguments
( if columnEntry.notnull ( if columnEntry.notnull && not columnEntry.isOmittable
then ["NON_NULL", "SCALAR"] then ["NON_NULL", "SCALAR"]
else ["SCALAR"] else ["SCALAR"]
) )