title: How to pass Object to mutation of apollo graphql
body: <p>I try to pass variables to my mutation in react project. It is <strong>working</strong> static code:</p>
  
  <pre><code>const EDIT_WORD = gql`
    mutation {
      editWord(
        eng_word: "apple"
        data: { eng_word: "apple1", ru_word: "яблоко1" }
      ) {
        eng_word
      }
    }
  ...
  const [editWordHook] = useMutation(EDIT_WORD);
  ...
  editWordHook();
  </code></pre>
  
  <p>It is code with some mistake:</p>
  
  <pre><code>const EDIT_WORD = gql`
    mutation($eng_word: String!, $data: wordInput!) {
      editWord(
        eng_word: $eng_word
        data: { eng_word: $eng_word, ru_word: $ru_word }
      ) {
        eng_word
      }
    }
    `;
  ...
  const [editWordHook] = useMutation(EDIT_WORD);
  ...
  editWordHook({
          variables: {
            eng_word: editedWord,
            data: {
              eng_word: englishWordText,
              ru_word: russianWordText,
            },
          },
        });
  </code></pre>
  
  <p>Instead of [$data: wordInput!] I tried </p>
  
  <pre><code>$data: { $eng_word: String!, $ru_word: String! }
  </code></pre>
  
  <p>But is didn't help...  Error log didn't provide anything valuable:</p>
  
  <pre><code>// value or the constructed error will be meaningless.
  &gt; 46 | constructor({
       | ^  47 |   graphQLErrors,
    48 |   networkError,
    49 |   errorMessage,
  </code></pre>
  
  <p>Already spent 10 hours and can't find mistake...</p>