Use GraphQL Variables to Do Queries

  • must name our queries
  • use variables to programmaticially give queries parameters

Example format

query findPersonByName($nameToSearch: String!) {
findPerson(name: $nameToSearch) {
name
phone
address {
street
city
}
}
}