1
Fork 0
mirror of https://github.com/Airsequel/AirGQL.git synced 2025-07-29 06:13:20 +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,
($),
(&),
(&&),
(<&>),
(>>=),
)
@ -73,6 +74,7 @@ import AirGQL.Lib (
column_name_gql,
datatype_gql,
getColumns,
isOmittable,
notnull,
select_options,
)
@ -1217,7 +1219,7 @@ getSchemaFieldOutput dbId conn accessMode tables = do
colName
"" -- TODO: Reactivate description when user can specify it
[] -- No arguments
( if columnEntry.notnull
( if columnEntry.notnull && not columnEntry.isOmittable
then ["NON_NULL", "SCALAR"]
else ["SCALAR"]
)