ember-graphql / ember-apollo-client

🚀 An ember-cli addon for Apollo Client and GraphQL
MIT License
279 stars 72 forks source link

Await overriden functions when returning promises #425

Closed ghusse closed 2 years ago

ghusse commented 2 years ago

According to ember's documentation, the function beforeModel on routes can return Promises.

The previous implementation of ember-apollo-client did not allow to correctly use both async beforeModel & @queryManager on a route. Because of the override done by the plugin, it was not possible to await for the result of a beforeModel method.

With this fix,

josemarluedke commented 2 years ago

Thank you @ghusse . Published in v4.1.0.

ghusse commented 2 years ago

Thanks!