query title($name: string = "Bauman") { ... }query title($age: int = "95") { ... }query title($uids: string = "0x1") { ... }query title($uids: string = "[0x1, 0x2, 0x3]") { ... }. The value of the
variable is a quoted array.Variables can be defined and used in queries which helps in query reuse and
avoids costly string building in clients at runtime by passing a separate
variable map. A variable starts with a $ symbol. For HTTP requests with
GraphQL Variables, we must use Content-Type: application/json header and pass
data with a JSON object containing query and variables.
$a has a default
value of 2. Since the value for $a isnβt provided in the variable map,
$a takes on the default value.! canβt have a default value but
must have a value as part of the variables map.int, float, bool
and string.["13", "14"].