title: aws appsync graphql "Expected JSON object for '$[filter]' but got a 'STRING' instead."
body: <p>I'm trying to filter results based on the id of a child on graphql and receiving the following error:</p>
  
  <blockquote>
    <p>"Expected JSON object for '$[filter]' but got a 'STRING' instead."</p>
  </blockquote>
  
  <p>Most of the code was generated by aws amplify.</p>
  
  <p><strong>Schema</strong></p>
  
  <pre><code>type Company {
      id: ID!
      name: String!
      disabled: Int
  }
  
  type Customer {
      id: ID!
      name: String!
      company: Company!
      disabled: Int
  }
  
  input ModelCustomerFilterInput {
      id: ModelIDFilterInput
      name: ModelStringFilterInput
      disabled: ModelIntFilterInput
      company: ModelCompanyFilterInput #added by me
      and: [ModelCustomerFilterInput]
      or: [ModelCustomerFilterInput]
      not: ModelCustomerFilterInput
  }
  
  input ModelCompanyFilterInput {
      id: ModelIDFilterInput
      name: ModelStringFilterInput
      disabled: ModelIntFilterInput
      and: [ModelCompanyFilterInput]
      or: [ModelCompanyFilterInput]
      not: ModelCompanyFilterInput
  }
  </code></pre>
  
  <p><strong>Query</strong></p>
  
  <pre><code>query ListCustomers($filter: ModelCustomerFilterInput, $limit: Int, $nextToken: String) {
    listCustomers(filter: $filter, limit: $limit, nextToken: $nextToken) {
      __typename
      items {
        __typename
        id
        name
        company {
          __typename
          id
          name
          disabled
        }
        disabled
      }
      nextToken
    }
  }
  
  {"filter": {"company": {"id": {"eq": "example"}}}}
  </code></pre>