Filtering with null / optional variable via apollo client

What do you expect by providing null? Just need a way to return no data? What do you mean by


I believe that if you used ID for the type of id then the correct filter would be filter: { id: [$postId] } with $postId being of type ID!.

If you want to be able to provide a null variable, you could extract the [...] to the variable layer and then it would accept null: filter: { id: $postIds } with variable type $postIds: [ID!]