Open JonnyBGod opened 7 years ago
@JonnyBGod, @Tallyb, just to be sure, currently, attempting to query a relation with this structure is unsupported? I guess I should also ask--is this package being supported any longer? Seems to have been abandoned.
graphQL
{
user(id: "59e943fe9c2121128398230b") {
roles {
totalCount
roles {
id
name
}
}
}
}
user.json
...
"relations": {
"roles": {
"type": "hasMany",
"model": "role",
"through": "userRole",
"foreignKey": "userId"
}
},
...
role.json
...
"relations": {
"users": {
"type": "hasMany",
"model": "user",
"through": "userRole",
"foreignKey": "roleId"
}
},
...
user-role.json
...
"relations": {
"roles": {
"type": "belongsTo",
"model": "role",
"foreignKey": "roleId"
},
"users": {
"type": "belongsTo",
"model": "user",
"foreignKey": "userId"
}
},
...
Just a placeholder for tracking since it is difficult to track from project.