Typed query parameters
A query parameter in Diver has a type, and the builder gives each type the control that fits it, so the app on the other end gets the value it expects.
In one minute
- Four types:
String,Boolean,ListandEnum.- A boolean writes exactly
trueorfalse; a list repeats its key.Enumis offered only when a template declares its values.
The four types#
| Type | Control | In the URI |
|---|---|---|
String |
a text field | ?sort=price |
Boolean |
a switch, with the value beside it | ?preview=true or ?preview=false |
List |
a stack of values, with Add value |
?tags=new&tags=sale |
Enum |
a choice of the declared values, or Not set |
?size=large |
A value left empty is left out of the URI. On a phone the type is a segmented control on each row; in a wide window the parameters are a table with Type, Name and Value columns, and the type is a drop-down.
Adding a parameter#
Add parameter adds a row; give it a name and a type. With no parameters the table says No query parameters. Parameter names are coloured apart from the rest of the URI, so they stand out in a long link.
Parameters from a template#
A deep link template in your team's apps declares its parameters: each with a name, a type, whether it is required, and for Enum the values in order. Opened from a template, the builder fixes the names and types and lets you fill in the values.
A required parameter is marked with an asterisk in the app's lists, and the app pane says Requires and the names. The builder does not stop you sending without it, so check those first.
A value the template does not declare#
An Enum set to a value the template does not list is shown in red, so a value outside the declared set stands out before it is sent.