title: Reactjs/Graphql: TypeError: Object(...) is not a function
body: <p>After selecting a date and time then clicking the submit button I get the following error:</p>
  
  <blockquote>
    <p>TypeError: Object(...) is not a function</p>
  </blockquote>
  
  <p>The object is referring to is Action which is a query so I don't understand why it is saying it is not a function.  Also, please review handleSubmit event and ensure I am calling Action correctly. THanks!!</p>
  
  <p>The render Component</p>
  
  <pre><code>class Calendar extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        inputValue: ""
      };
  
      this.handleSubmit = this.handleSubmit.bind(this);
    }
  
    handleSubmit = event =&gt; {
      event.preventDefault();
  
      console.log(this.state.inputValue);
      this.setState({
        inputValue: new Date(document.getElementById("time").value).valueOf()
      });
      Action({
        variables: {
          timestamp: this.state.inputValue
        }
      });
  
      console.log(this.state.inputValue);
    };
  
    render() {
      console.log(this.props);
      return (
        &lt;div className="Calendar"&gt;
          &lt;form onSubmit={this.handleSubmit.bind(this)}&gt;
            &lt;label&gt;Date/Time&lt;/label&gt;
            &lt;input type="datetime-local" id="time" step="1" /&gt;
            &lt;input type="submit" value="Submit" /&gt;
          &lt;/form&gt;
        &lt;/div&gt;
        //{this.render(){return (&lt;UserList /&gt;)};
      );
    }
  }
  
  export default graphql(Action, {
    options: props =&gt; ({
      variables: {
        timestamp: props.inputValue
      }
    })
  })(Calendar);
  </code></pre>
  
  <p>The Action query</p>
  
  <pre><code>const Action = gql`
    query($timestamp: Float!) {
      action(timestamp: $timestamp) {
        action
        timestamp
        object {
          filename
        }
      }
    }
  `;
  </code></pre>