TwentyT
Twenty4mo ago
15 replies
greg [iero]

Workflow : Count number of objects

Hello, when a "Company" is updated, I want to update the number of Inks (it's a custom object) associated.

So I created a workflow with a serverless code but I struggle to access to this "inks" object

If I launch this :

query MyQuery { companies(filter: {name: {eq: "Diamine"}}) { edges { node { id name inks { countNotEmptyId } } } } }

I get this :
{ "data": { "companies": { "edges": [ { "node": { "id": "6ce1408b-7b4e-444a-9a79-2a4dd8541569", "name": "Diamine", "inks": { "countNotEmptyId": 163 } } } ] } } }

Is there a way to do get this "countNotEmptyId" using a serverless function ?
Was this page helpful?