code: function queryData(dgraphClient) {
      // Run query.
      const query = `query all($a: string) {
          all(func: eq(name, $a)) {
              uid
              name
              age
              married
              loc
              dob
              friend {
                  name
                  age
              }
              school {
                  name
              }
          }
      }`;
      const vars = { $a: "Alice" };
  
      return dgraphClient.newTxn().queryWithVars(query, vars).then((res) => {
          const ppl = res.getJson();
  
          // Print results.
          console.log(`Number of people named "Alice": ${ppl.all.length}`);
          for (let i = 0; i < ppl.all.length; i += 1) {
              console.log(ppl.all[i]);
          }
      });
  }
docs: Query for data.