title: Flutter GraphQL How to call 2 mutations with one button?
body: <p>I've created and tested 2 GraphQL mutations. I'm using them in Flutter, such that when I tap on a button, it will trigger both mutations. It was ok when I put just one of them in the onPressed, only one will work. So how can I call both in the onPressed?</p>
  <p>I've tried creating like function1() and function2() to hold each mutations, but the onPressed don't seem to execute those functions.</p>
  <p>Appreciate for any help. Thanks.</p>
  <p>This part call the 1st mutation that append an item to a list. I call <code>addToVol()</code> but it will not trigger the 2nd mutation.</p>
  <pre><code>Padding(
    padding: EdgeInsets.all(16),
    child: GraphQLProvider(
    client: graphQLConfiguration.client,
    child: CacheProvider(
      child: Mutation(
        options: MutationOptions(
          documentNode: gql(addToSession),
          update: (Cache cache, QueryResult result) {
            return cache;
          },
          onCompleted: (dynamic resultData) {
            print(resultData);
          },
        ),
        builder: (RunMutation runMutation, QueryResult result) {
          if (result.hasException) {
            print(result.exception.toString());
          }
          return FlatButton(
            onPressed: () async {
              if (snapshot.hasData) {
                if (_isAuthenticated) {
                  if (!haveSession) {
                    runMutation({
                      'org': activity.org,
                      'sessionId': activity.id,
                      'volId': savedOrgValue,
                    });
  //                addToVol();
                  } else {
  
                  }
                  } else {
                    Navigator.push(
                      context,
                      PageRouteBuilder(
                        pageBuilder: (context, animation1, animation2) =&gt; Login(),
                        transitionDuration: Duration(seconds: 0),
                      ),
                    );
                  }
                }
              },
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(80.0)),
              padding: EdgeInsets.all(16),
              textColor: Colors.white,
              child: Ink(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.all(Radius.circular(80.0)),
                ),
                child: Container(
                  child: Text('Sign Up for Activity'),
                ),
              ),
            );
          }
        )
      )
    ),
  ),
  </code></pre>
  <p>And I've <code>addToVol()</code> at the bottom.</p>
  <pre><code>addToVol() {
    GraphQLProvider(
      client: graphQLConfiguration.client,
      child: CacheProvider(
        child: Mutation(
          options: MutationOptions(
            documentNode: gql(registerSessionToVol),
            update: (Cache cache, QueryResult result) {
              return cache;
            },
            onCompleted: (dynamic resultData) {
              print(resultData);
            },
          ),
          builder: (RunMutation runMutation, QueryResult result) {
            if (result.hasException) {
              print(result.exception.toString());
            }
            runMutation({
              'org': activity.org,
              'sessionId': activity.vid,
              'volId': savedOrgValue,
            });
            return;
          }
        )
      )
    );
  }
  </code></pre>