title: Passing variables to query with complex input types
body: <p>According to graphQl docs:</p>
  <blockquote>
  <p>When you're passing arguments in code, it's generally better to avoid
  constructing the whole query string yourself. Instead, you can use $
  syntax to define variables in your query, and pass the variables as a
  separate map.</p>
  </blockquote>
  <p><a href="https://graphql.org/graphql-js/passing-arguments/" rel="nofollow noreferrer">https://graphql.org/graphql-js/passing-arguments/</a></p>
  <p>In this context, I'm trying to query the following schema:</p>
  <pre><code>const typeDefs = &quot;
  input OrderInputData {    
    date: String!
    time: String!
    frequency: String!
    extras: [Int!]
    mailAlarm: String
    phoneAlarm: String
    rating: Float
    comments: String
  }
  
  type Mutation {
    updateIntent(
      paymentIntentId: String, 
      setupIntentId: String, 
      pairIntentId: String,
      orderInput: OrderInputData): Boolean
  }&quot;
  </code></pre>
  <p>I'm having a bit of difficulty to build the query respecting graphQl's better practices, since this case is more complex than the one depicted on the documentation, due to the presence of a nested document(OrderInputData). This is what I have up to know:</p>
  <pre><code>  const dummyData = {
      date: &quot;11/11/2020&quot;,
      frequency: &quot;One time&quot;,
      time: &quot;6:17 PM&quot;,
      mailAlarm: &quot;teste&quot;,
      phoneAlarm: &quot;teste&quot;,
      extras: [1, 3, 7],
    };
  
  const graphqlQuery = {
        query: `
        mutation updateIntent (
          $paymentIntentId: String, 
          $pairIntentId: String, 
          $orderInput: { 
            date: String!, 
            time: String!, 
            frequency: String!, 
            extras: [Int!], 
            mailAlarm: String, 
            phoneAlarm: String
          }) {
        updateIntent (
          paymentIntentId: $paymentIntentId, 
          pairIntentId: $pairIntentId, 
          orderInput: { 
            date: $date, 
            time: $time, 
            frequency: $frequency, 
            extras: $extras, 
            mailAlarm: $mailAlarm, 
            phoneAlarm: $phoneAlarm
          })
        }`,
        variables: {
          paymentIntentId: paymentIntentId, 
          pairIntentId: setupIntentId,
          &quot;orderInput.date&quot;: dummyData.date, 
          &quot;orderInput.time&quot;: dummyData.time, 
          &quot;orderInput.frequency&quot;: dummyData.frequency, 
          &quot;orderInput.extras&quot;: dummyData.extras, 
          &quot;orderInput.mailAlarm&quot;: dummyData.mailAlarm, 
          &quot;orderInput.phoneAlarm&quot;: dummyData.phoneAlarm
        }
  </code></pre>
  <p>What is my mistake?</p>