Graph search · GraphQL input

SearchQueryExpressionInput input

A structured where clause: the input mirror of SearchQueryExpression, for callers that build a query as a data structure instead of writing the where-clause string. Supply it as GraphSearchQueryInput.whereExpression in place of where.

GraphQL input objects cannot be polymorphic, so the variants are carried as sibling nullable fields and expressionType names which one applies. Exactly the field named by expressionType must be supplied and every other variant field must be null.

The server validates the tree against the object type's search schema and plans it directly — it is never rendered into query text and re-parsed — so the two encodings run through the same validation and planner and describe the same searches. Because nothing round-trips through the query syntax, this form can express values that syntax cannot: a text value of true on a text field, or one containing both a single and a double quote, is just a string here.

Keys are the dot-notation paths from graphSearchSchema and their casing is autocorrected, exactly as in a where string. A key that is not a field of the query node's object type is rejected rather than being treated as query syntax.

Fields

Input Field Description
expressionType - SearchQueryExpressionType! Names which variant field below carries this node.
operatorExpression - SearchQueryOperatorExpressionInput The node when expressionType is OPERATOR.
keyValue - SearchQueryMatchKeyValueExpressionInput The node when expressionType is KEY_VALUE.
keyValueNumeric - SearchQueryMatchKeyValueNumericExpressionInput The node when expressionType is KEY_VALUE_NUMERIC.
keyValueTime - SearchQueryMatchKeyValueTimeExpressionInput The node when expressionType is KEY_VALUE_TIME.
keyValueBoolean - SearchQueryMatchKeyValueBooleanExpressionInput The node when expressionType is KEY_VALUE_BOOLEAN.
keyValueFullText - SearchQueryMatchTextExpressionInput The node when expressionType is KEY_VALUE_FULL_TEXT.
keyNull - SearchQueryMatchKeyNullExpressionInput The node when expressionType is KEY_NULL.

Used by

  • GraphSearchQueryInput input: Specifies the search criteria for a single graph query: the object type to return, optional time and location filters, relationship constraints, the…
  • SearchQueryOperatorExpressionInput input: An AND/OR node over sub-expressions: the input mirror of SearchQueryOperatorExpression.

Example

Example

{
  "expressionType": "OPERATOR",
  "operatorExpression": SearchQueryOperatorExpressionInput,
  "keyValue": SearchQueryMatchKeyValueExpressionInput,
  "keyValueNumeric": SearchQueryMatchKeyValueNumericExpressionInput,
  "keyValueTime": SearchQueryMatchKeyValueTimeExpressionInput,
  "keyValueBoolean": SearchQueryMatchKeyValueBooleanExpressionInput,
  "keyValueFullText": SearchQueryMatchTextExpressionInput,
  "keyNull": SearchQueryMatchKeyNullExpressionInput
}