I'm testing the database from Directus in postman with graphql.
query{
test3{
data{
name
sku
tree{
name
sku
}
}
}
}

To get the same result with a M2O relationship:
{
"data": {
"test3": {
"data": [
{
"name": "T-Shirt",
"sku": "12",
"tree": {
"name": "T-Shirt T1",
"sku": "1236"
}
}
...
]
}
}
}
I get an empty Array even though on Directus I get displayed that the two products are linked trough the M2M relationship. I have the same problem with a O2M relation but not with a M2O, though it's the "same relationship"
{
"data": {
"test3": {
"data": [
{
"name": "T-Shirt",
"sku": "12",
"tree": []
}
...
]
}
}
}
origin/master branch]Thanks for the comprehensive ticket, @joshuabush — would you happen to have a SQL schema that we can more quickly test with? If it has any sensitive data you can share with us on Slack:
I did some testing, so i hope you wont get confused.
My names for them are Item3 and Item4 , but I have the same problem with products and simpleproducts
basestacca-mg1-live.sql.zip
I have the same issue with an O2M relation.
I'm using a somewhat more exotic stack with Amazon Aurora and Docker, but I don't think any of that causes the issue. I'm willing to do some investigating, but could you help me get started? Maybe some logs I can check or flags to enable.
{
persons {
data {
name,
affiliations {
id
}
}
}
}
Returns
{
"data": {
"persons": {
"data": [
{
"name": "Klaus Iohannis",
"affiliations": []
}
]
}
}
}
But Klaus has 2 affiliations in my database.
EDIT: Tested on a more traditional LAMP stack and got the same result.
duplicate issue with #1167
Why is it closed?
You didn't gave me a solution how to fix it
@bjgajjar
@joshuabush - It is duplicate of #1167. So I closed this issue. You will get your solution when the #1167 will be resolved :)
Okay sorry, I just thought because the user of the issue #1167 didn't answered you wouldn't consider to work further on that problem, because of the lack of information.
Thanks again! ^^
Any Open tickets are being worked on, or will be worked on. And these new duplicates are referenced there too... so even this ticket gives us more context. :)
Most helpful comment
Any
Opentickets are being worked on, or will be worked on. And these new duplicates are referenced there too... so even this ticket gives us more context. :)