I'm submitting a ...
PostGraphile version: 4.0.1
Summary:
Here https://www.graphile.org/postgraphile/why-nullable/#what-about-computed-fields it's said
I'd be happy to accept a Pull Request that adds functionality marking a function as non-nullable via a smart comment (e.g.
COMMENT ON FUNCTION foo_func(foo) IS E'@nonNull';) - do raise an issue if this is of interest to you.
Is this smart comment implemented already?
Someone has implemented a plugin; see this thread:
https://github.com/graphile/graphile-engine/pull/352 This is introducing the makeChangeNullabilityPlugin too; which you can use to set certain fields nullable (true) or non-nullable (false); e.g.:
makeChangeNullabilityPlugin({
User: {
email: true,
id: false,
},
Forum: {
secret: true,
}
})
(But I prefer the smart comment approach.)
Most helpful comment
https://github.com/graphile/graphile-engine/pull/352 This is introducing the
makeChangeNullabilityPlugintoo; which you can use to set certain fields nullable (true) or non-nullable (false); e.g.:(But I prefer the smart comment approach.)