Attempting to establish several bidirectional queries between models
Prototyping a DAO application for community growth.
Currently having trouble with the model architecture: GitHub - 0xCozart/nabu_server
type NabuProfileAlpha
@loadModel(
id: "kjzl6hvfrbw6c7m2o4v21vs0zc5b7y4lxrepf67z42ydmifpcnvxtby4fhu6mhl"
) {
id: ID!
}
type DAO
@loadModel(
id: "kjzl6hvfrbw6c5e8lzp8pes8n3yrq5o3kai7el3yi7oqy44d85oksz90lczdfte"
) {
id: ID!
}
type MembersDaoProfile
@loadModel(
id: "kjzl6hvfrbw6c75un6ip9ccmhbjh0ch38ds95ym675v66qjbg9phfzjeav03xpc"
) {
id: ID!
}
type Relations
@createModel(
accountRelation: LIST
description: "Relate Nabu profile to a DAO model."
) {
nabuID: StreamID! @documentReference(model: "NabuProfileAlpha")
nabu: NabuProfileAlpha! @relationDocument(property: "nabuID")
membersDaoProfileID: StreamID! @documentReference(model: "MembersDaoProfile")
membersDaoProfile: MembersDaoProfile!
@relationDocument(property: "membersDaoProfileID")
daoID: StreamID! @documentReference(model: "DAO")
dao: DAO! @relationDocument(property: "daoID")
}
type Relations
@loadModel(
id: "kjzl6hvfrbw6c5awvbcox32lixov8g07p8e0e7m9aoz4nprmny751kfmm353oc3"
) {
id: ID!
}
type NabuProfileAlpha
@loadModel(
id: "kjzl6hvfrbw6c7m2o4v21vs0zc5b7y4lxrepf67z42ydmifpcnvxtby4fhu6mhl"
) {
daoList: [Relations] @relationFrom(model: "Relations", property: "daoID")
daoProfiles: [Relations]
@relationFrom(model: "Relations", property: "membersDaoProfileID")
}
Although the mutation to create the relation doc is successful (see below), when querying NabuProfile for the daoList or daoProfiles, I receive an empty array. Any help would be appreciated.
mutation RelationMutation {
createRelations(
input: {
content: {
nabuID: "k2t6wzhkhabz4w24beldx5qk00h6oh6vq6z5bhvmh0mbxoix8393yf8qjr9h4y"
membersDaoProfileID: "kjzl6kcym7w8y7isrss6ifetnkrdn9yt669j1evabau1u99p1s6uk8dhju97o79"
daoID: "kjzl6kcym7w8y50al2p6lxsrjvcj3h1d0j1a8uan1ezp7lp7jpkei6ubqlvnj86"
}
}
) {
document {
id
daoID
nabuID
nabu {
id
displayName
}
dao {
id
}
}
}
}