How do I specify a value of NULL (question not answered) in graphQL?

In a graphQL interviews query I can filter by specific answerCodes for a question (e.g. 1 or 2)

       some : {
         entity : { variable: {eq: "visit2"}}
         answerCode : { eq: null}  # for categorical
       }

Now I want to filter by a question if it has not been answered.
It should have a value of “null”, but graphQL doesn’t return any results.
Also, if I specify

answerCode : { neq: 1} # for categorical

it will not return interviews where question visit2 is not answered (as it would in a validation condition).

Any suggestions?

Thanks,
Klaus

I found a way to filter by the condition:
“question visit2 does not exist or has not been answered”:

   none : {
     entity : { variable: {eq: "visit2"}}
   }

Still I would like to know if a value for null = not-answered exists in graphQL.

It’s not only graphQL but also our underlining code structure.
Checking for two conditions should be performed: existence of the answer and it’s emptiness:

"or": [
{"identifyingData": 
  {"none": 
    {"entity": {"variable": {"eq": "visit2"}}}
  }
},
{"identifyingData": 
  {"some": 
    {"entity": {"variable": {"eq": "visit2"}},
	 "isEnabled": {"eq": true}, 
	 "value": {"eq": ""}}
  }
}]
1 Like

Thank you @vitalii, this is useful and precise information which answers my question.
I am sure it will also serve as documentation for future searches in the forum about SuSo graphQL syntax.

Thanks,
Klaus