This would then allow countFoo to work like listFoo with the auth filter. This basically just involves applying this logic:
#if( !$util.isNullOrEmpty($ctx.stash.authFilter) )
#set( $filter = $ctx.stash.authFilter )
#if( !$util.isNullOrEmpty($args.filter) )
#set( $filter = {
"and": [$filter, $args.filter]
} )
#end
This would then allow
countFooto work likelistFoowith the auth filter. This basically just involves applying this logic: