React Apollo: Dynamically update GraphQL query from Component state : <p>I have a component that shows results from a GraphQL query using the <code>react-apollo</code> decorator syntax. The query accepts a parameter, which I want to set dynamically based on component state.</p>

<p>Consider the following simplified example:</p>

<pre><code>import * as React from ‘react’;
import { graphql } from ‘react-apollo’;
import gql from ‘graphql-tag’;

const myQuery = gql`
    query($active: boolean!) {
        items(active: $active) {

        }
    }
`;

@graphql(myQuery)
class MyQueryResultComponent extends React.Component {
    public render() {
        return &lt;div&gt;
            &lt;input type=“checkbox” /* other attributes and bindings */ /&gt;
            {this.props.data.items}
        &lt;div&gt;;
    }
}
</code></pre>

<p>When the checkbox is clicked I want to resubmit the query, dynamically setting the <code>active</code> attribute in <code>myQuery</code>, based on the state of the checkbox. I've omitted the handler and bindings of the checkbox for brevity, but how can I cause the query to be re-submitted upon a state change?</p>
