Firstly - Amazing plugin! Thanks for the hard work.
I have a morphToMany relationship set up. When querying the data, I am not receiving the related models - even through they have been retrieved from GQL and are stored in Vuex.
My query
CurrentUser.query().with('roles').first()
If I log CurrentUser polymorphic manyToMany the relationship roles is an empty array.
However, if I log Role.query().get() and ModelHasRole.query().get(), the correct data has been retrieved and stored correctly from the server (The GQL query and response also proves to be correct).
I presume I am missing something here, but can't for the life of me see what. Normal belongsTo relationships (etc) seem to work perfectly. It is just the polymorphic relationships that don't seem to be working here.
Can you see what's up with this? (Sorry for the long post ;-))
Hey,
Firstly - Amazing plugin! Thanks for the hard work.
I have a morphToMany relationship set up. When querying the data, I am not receiving the related models - even through they have been retrieved from GQL and are stored in Vuex.
My query
CurrentUser.query().with('roles').first()
If I log
CurrentUser
polymorphic manyToMany the relationshiproles
is an empty array.However, if I log
Role.query().get()
andModelHasRole.query().get()
, the correct data has been retrieved and stored correctly from the server (The GQL query and response also proves to be correct).I presume I am missing something here, but can't for the life of me see what. Normal belongsTo relationships (etc) seem to work perfectly. It is just the polymorphic relationships that don't seem to be working here.
Can you see what's up with this? (Sorry for the long post ;-))
ModelHasRole response when logged
CurrentUser model
ModelHasRole model
Role model