Query for Nodes _not_ connected to another node

Let’s say i have the following schema:

type User {
  id: ID!
  name: String! @id

type Task {
  name: String! @search
  assignedTo: User

how can i query all Tasks that are not assigned to any user?

I think you can do:

filter: { not: { has: assignedTo }

Not an expert…