Query Syntax

A GraphQL query has the following syntax

query <operation name>[(<variables>)] {
  <object>[(<criteria>)] {
      <Field> [<Field>…]
  }
}

Where:

<operation name>  is a string identifying the query. This is “your name” for the query – you can put anything you like here.
<variables>  Optional - Identifies any variables you are using in the query and their type. If you’re not using any variables in the query, then you can leave this blank. See Using Variables in GraphQL for more information.
<object> The object you want to query – if you’re using the IDE you can click on “Schema Reference” to get the list of objects that you can query. See Accessing the GraphQL API with a Browser for information on browsing the Schema Reference.
<criteria>   Optional - any criteria you want to apply to the query to restrict the results. The criteria will change depending on what is available on the specified <object> and can include paging information (take/skip), the order in which you want the results to be presented (order) as well as selection clauses to limit what is returned (where). The criteria is optional and without it, all the records for the specified object are returned.
<field>  A list of one or more fields to return in the result set.

For more information on take/skip see Paging through Results

For more information on ordering see Ordering the Results

If you have any further questions, please reach out to our Support Team via Contact Us.