title: Network error: Response not successful: Received status code 400
body: <p>My brain broke. Why server send this error.I looked through all the articles with the same error and did not find a solution. What is the problem? How i can fixed this error? Please help.
  My code.</p>
  
  <p><strong>App.jsx</strong>
  This is client for Apollo Client</p>
  
  <pre><code>const client = new ApolloClient({
    uri: "http://localhost:4000/api/",
    request: (operation) =&gt; {
      const token = localStorage.getItem("token");
  
      operation.setContext({
        headers: {
          authorization: token ? `Bearer ${token}` : ""
        }
      });
    }
  });
  </code></pre>
  
  <p><strong>signUp.js</strong> 
  This is mutation for sighUp</p>
  
  <pre><code>import { gql } from "apollo-boost";
  
  export default gql`
    mutation signup($firstName: String!, $secondName: String!, $email: String!, $password: String! ) {
      signup(firstName: $firstName, secondName: $secondName, email: $email, password: $password ) 
    }
  `;
  </code></pre>
  
  <p><strong>RegForm.jsx</strong> 
  It is my component registration</p>
  
  <pre><code>import React, {Component} from 'react'
  import {Field, reduxForm, SubmissionError} from 'redux-form'
  import regForm from './RegForm.module.css'
  import { matchInput, passLength, email, required} from '../../../utils/validators'
  
  import RegMutation from '../../../queries/signup'
  import Button from '../../../UI/Button/Button'
  import myInput from '../../../UI/Input/Input'
  import { withMutation } from "react-apollo";
  
  const passwordValidator = passLength(8);
  
  
  class RegForm extends Component {
    constructor(props){
      super(props)
  
      this.handleSubmit = this.handleSubmit.bind(this);
    }
  
      handleSubmit(fields) {
        console.log('Fields from handleSubmit',fields);
  
        const { mutate } = this.props;
  
        return new Promise((resolve, reject) =&gt; {
          mutate({
            variables: {
              firstName: fields.loginField,
              email: fields.email,
              password: fields.passwordField
            }
          })
            .then(res =&gt; {
             console.log(res.data);
              resolve(res);
            })
            .catch(e =&gt; {
              reject(new SubmissionError({ _error: e?.message }));
            });
     });
    }
  
      render(){
          return (
              &lt;div&gt;
              &lt;form 
                  className={regForm.formContent}
                  onSubmit={this.props.handleSubmit(this.handleSubmit)}
              &gt;
  
              &lt;Field 
                  name='loginField'
                  type='text'
                  component={myInput}
                  validate={[required]}
  
              /&gt;
              &lt;Field 
                  name='email'
                  type='text'
                  component={myInput}
                  validate={[email]}
  
              /&gt;
              &lt;Field 
                  name='passwordField'
                  type='password'
                  component={myInput}
                  validate={[passwordValidator]}
                  placeholderText='Введите пароль'
              /&gt;
              &lt;Field 
                  name='repPas'
                  type='password'
                  component={myInput}
                  validate={[matchInput]}
  
              /&gt;
              &lt;Button
                  onClick={this.Click}
                  className={regForm.button}&gt;Sign Up
              &lt;/Button&gt;
  
          &lt;/form&gt;
  
          {this.props.error ? &lt;span&gt;{this.props.error}&lt;/span&gt; : null}
          &lt;/div&gt;
          )
      }
  }
  const connectedToReduxForm = reduxForm({
    form: "loginForm",
  });
  
  
  
  export default withMutation(RegMutation)(connectedToReduxForm(RegForm))
  </code></pre>