title: AWS Amplify GraphQL - One to Many connections return empty list when queried
body: <p>I've been following the AWS GraphQL CLI guide for setting up an API for my app, but am having trouble with connections.</p>
  <p>The following is my current Graphql schema, with some attributes removed</p>
  <pre><code>type Employee @model {
    id: ID!
    employment: [Employment!] @connection(name: &quot;byEmployeeIDByCompanyID&quot;, fields: [&quot;id&quot;])
  }
  
  type Company @model {
    id: ID!
    employees: [Employment!] @connection(name: &quot;byCompanyIDByDateHired&quot;, fields: [&quot;id&quot;])
  }
  
  type Employment @model
    @key(name: &quot;byEmployeeIDByCompanyID&quot;, fields: [&quot;employeeID&quot;, &quot;companyID&quot;], queryField: &quot;employmentByEmployeeIDByCompanyID&quot;) {
    id: ID!
    companyID: ID!
    employeeID: ID!
    company: Company! @connection(fields: [&quot;companyID&quot;])
    employee: Employee! @connection(fields: [&quot;employeeID&quot;])
  }
  </code></pre>
  <p>When I query Employees or Companys, [Employment] always returns an empty array. Do I need to edit the resolvers for these fields? They should work out of the box, no?</p>
  <p>From my understanding, using @key with 'name' and multiple 'fields' creates a secondary index on the table, and specifying that key with @connection tells the connection to use that key instead of the tables primary index. In the &quot;byEmployeeIDByCompanyID&quot; key, for example, employeeID is the partition key, and companyID is the sort key. A query on the &quot;employmentByEmployeeIDByCompanyID&quot; queryField with an employeeID but no companyID returns all the employments for a given employee, which is what I want, so why isn't the connection working?</p>