title: Multiple subscriptions in AWS AppSync
body: <p>Similar to eugenekr back in March (<a href="https://stackoverflow.com/questions/55312173/multiple-subscriptions-in-aws-amplify-react-connect-component">question here</a>) I'm having trouble setting up more than one subscription for a Todo list. I have a creation subscription and a deletion subscription, both of which work when applied individually, so that's encouraging.</p>
  
  <p>If I follow mnishiguchi's suggestion and write multiple <code>&lt;Connect /&gt;</code> components I still can't get it to work. As far as I can tell, the subscription <code>&lt;Connect&gt;</code>s don't actually receive anything in <code>prev</code> to operate on. Records are still added and removed from the list.</p>
  
  <p>This code works (the list updates when a new Todo is added);</p>
  
  <pre><code>render() {
      return (
        &lt;Segment&gt;
          &lt;Connect
            query={graphqlOperation(ListTodos)}
            subscription={graphqlOperation(SubscribeToNewTodos)}
            onSubscriptionMsg={this.onNewTodo}
          &gt;
            {({ data, loading, errors }) =&gt; {
              if (loading) {
                return &lt;div&gt;Loading...&lt;/div&gt;;
              }
              if (errors.length &gt; 0) {
                return &lt;div&gt;{JSON.stringify(errors)}&lt;/div&gt;;
              }
              if (!data.listTodos) return;
  
              return &lt;TodosList todos={data.listTodos.items} /&gt;;
            }}
          &lt;/Connect&gt;
        &lt;/Segment&gt;
      );
    }
  </code></pre>
  
  <p>but if I get nothing at all if I switch to this;</p>
  
  <pre><code>render() {
      return (
        &lt;Segment&gt;
          &lt;Connect query={graphqlOperation(ListTodos)}&gt;
            {({ data, loading, errors }) =&gt; {
              if (loading) {
                return &lt;div&gt;Loading...&lt;/div&gt;;
              }
              if (errors.length &gt; 0) {
                return &lt;div&gt;{JSON.stringify(errors)}&lt;/div&gt;;
              }
              if (!data.listTodos) return;
  
              return &lt;TodosList todos={data.listTodos.items} /&gt;;
            }}
          &lt;/Connect&gt;
  
          &lt;Connect subscription={graphqlOperation(SubscribeToNewTodos)} onSubscriptionMsg={this.onNewTodo}&gt;
            {() =&gt; {}}
          &lt;/Connect&gt;
  
          &lt;Connect subscription={graphqlOperation(SubscribeToDeleteTodos)} onSubscriptionMsg={this.onDeleteTodo}&gt;
            {() =&gt; {}}
          &lt;/Connect&gt;
        &lt;/Segment&gt;
      );
    }
  </code></pre>
  
  <p>Suggestions would be appreciated, thank you.</p>