title: Filter AppSync Subscription
body: <p>I'm building a simple multiplayer game using AppSync (to avoid having to manage WebSocket from zero) and Amplify (specifically on Android, using Kotlin).</p>
  <p>The problem is that when players are connected to a game, should listen for updates for the other players (consider that I have a table on dynamo with Primary Key a UUID and the corresponding game-id and position of the player).</p>
  <p>So what I've done, is that after the player joins his game session register itself to <code>onUpdate</code> of <code>Player</code>... however now he receives the notification of the update of all the player... and even though I can easily filter this incoming events client side, I think it's a terrible idea, since AppSync have to notify to all registered users, all the updates.</p>
  <p>Instead I would like to specify a filter on the subscription, like when you perform a query, something like:</p>
  <pre><code>Amplify.API.subscribe(
      ModelSubscription.onUpdate(
         Player::class.java,
         Player.GAMEROOM.eq(currentPlayer.gameroom.id) // only players in the same gameroom
      ),
      { Log.i(&quot;ApiQuickStart&quot;, &quot;Subscription established&quot;) },
      { onCreated -&gt;
          ...
      },
      { onFailure -&gt; Log.e(&quot;ApiQuickStart&quot;, &quot;Subscription failed&quot;, onFailure) },
      { Log.i(&quot;ApiQuickStart&quot;, &quot;Subscription completed&quot;) }
  )
  </code></pre>
  <p>Are there ways to obtain this?<br />
  Since this is the only tipe of subscription that I will do to Player Update, maybe with a custom resolver something might be done?</p>