Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Queries with multiple roots doesn't produce a population object #19

Open
hennessyevan opened this issue Oct 22, 2019 · 0 comments · May be fixed by #20
Open

Queries with multiple roots doesn't produce a population object #19

hennessyevan opened this issue Oct 22, 2019 · 0 comments · May be fixed by #20
Labels
bug Something isn't working

Comments

@hennessyevan
Copy link

hennessyevan commented Oct 22, 2019

Describe the bug
Querying two models at once returns no population object.

To Reproduce
Use a query like this:

query Multiple {
  first {
    child {
      foo
    }
  }
  second {
    child {
      bar
    }
  }
}
console.log(registry.populate(info, First.modelName)) // -> []

Expected behavior
It should return population object for path.

console.log(registry.populate(info, First.modelName)) // -> [{ path: 'child', populate: [], select: ['id', 'foo'] }]

Desktop (please complete the following information):

  • OS: macOS 10.15
  • NodeJS Version: 10.16.3
  • GraphQL Version: 14.5.8
  • Mongoose Version: 5.7.5
@hennessyevan hennessyevan added the bug Something isn't working label Oct 22, 2019
hennessyevan added a commit to ParishConnect/mogr that referenced this issue Oct 23, 2019
@hennessyevan hennessyevan linked a pull request Oct 23, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant