title: Calling a graphQL query from within react client
body: <p>I'm trying to return a list of all users transactions, but I can't seem to call the graphQL query correctly. I've defined the query at the bottom and I'm trying to call it in refreshData(). What am I missing?</p>
  
  <pre><code>  async refreshData() {
      const allTransactions = await graphql(getTransactionsQuery);
      console.log(allTransactions);
      this.setState({
        transactions: allTransactions
      });
    }
  
    render() {
      const transactionsFromState = this.state.transactions;
      const transactions = transactionsFromState.map((transaction) =&gt;
        &lt;li key={transaction.id}&gt;{transaction}&lt;/li&gt;
      );
      return (
        &lt;div className="App"&gt;
          &lt;button onClick={() =&gt; this.refreshData()}&gt; Refresh Data &lt;/button&gt;
          &lt;ul&gt;{ transactions }&lt;/ul&gt;
        &lt;/div&gt;
      );
    }
  }
  
  const getTransactionsQuery = gql`
    query getTransactions($id: ID!) {
      transactions(userId: $id){Transaction}
    }
  `;
  
  //change User ID use context.user.id
  export default graphql(getTransactionsQuery)(App);
  </code></pre>