Hi guys, how should I implement my resolver when I...
# prisma-whats-new
m
Hi guys, how should I implement my resolver when I get a parameter that might be null/undefined and I would like to create a connection only if it is not so? I have the following mutation:
Copy code
data: {
          name,
          images: {
            connect: {
              id: image
            }
          }
        }
, which throws an error when the image param is null:
Copy code
"_data": {
    "name": "Badman",
    "images": {
      "connect": [
        {}
      ]
    }
  },
Do I need to create different mutations with an if loop or is there a quick and dirty way? Should prisma connect ignore empty values, i.e. I though it did in the past... Any thoughts? Thanks!