fix(automate): return null if not a function (#4716)

This commit is contained in:
Chuck Driesler
2025-05-13 09:00:39 +01:00
committed by GitHub
parent e64e77cd6d
commit 6d33de50d1
@@ -390,6 +390,9 @@ export = (FF_AUTOMATE_MODULE_ENABLED
},
AutomateFunctionRun: {
async function(parent, _args, ctx) {
if (!parent.functionId) {
return null
}
const fn = await ctx.loaders.automationsApi.getFunction.load(
parent.functionId
)
@@ -538,6 +541,9 @@ export = (FF_AUTOMATE_MODULE_ENABLED
},
AutomateFunctionRelease: {
async function(parent, _args, ctx) {
if (!parent.functionId) {
return null
}
const fn = await ctx.loaders.automationsApi.getFunction.load(
parent.functionId
)