Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-19-2019 12:51 AM
I have Companies and Assets nodes with a relationship, HAS_ASSET that has a property 'workingInterest':
(c:Company)-[:HAS_ASSET]->(a:Asset)
if I define my schema like so:
Asset {
assetId: Int
name: String
companies: [Company] @relation(name:"HAS_ASSET", direction: IN)
}
type Company {
name: String
assets: [Asset] @relation(name: "HAS_ASSET", direction:OUT)
}
all is well except I need the 'workingInterest', so I tried:
Asset {
assetId: Int
name: String
companies: [AssetDetail]
}
type Company {
name: String
assets: [AssetDetail]
}
type AssetDetail @relation(name: "HAS_ASSET") {
from: Company
to: Asset
workingInterest: Float
}
I get an empty array for assets in Company and companies in Asset. Any suggestions on how to debug this would be appreciated.
09-24-2019 09:05 AM
Is this with the database plugin or the neo4j-graphql.js library? Can you share the generated Cypher query (should be in the logs).
11-27-2019 10:13 AM
William,
I just realized I never followed up on this.
I am using the database plugin.
the details from the log:
MATCH (asset
:Asset
)
RETURN graphql.labels(asset
) AS _labels
,
asset
.assetId
AS assetId
,
asset
.name
AS name
,
[ (asset
)-[:companies
]->(asset_companies
:AssetDetail
) | asset_companies
{_labels
: graphql.labels(asset_companies
), from
: head([ (asset_companies
)-[:from
]->(asset_companies_from
:Company
) | asset_companies_from
{_labels
: graphql.labels(asset_companies_from
), .name
}]), .workingInterest
}] AS companies
LIMIT 10
02-13-2020 04:29 AM
Hi Joshua,
Did you resolve this problem?
I'm facing to the same problem like you used to. Could you help me on this?
06-30-2020 09:04 PM
Hi, @quan.nguyen @William_Lyon,
We are facing the same issue but for the last two days, I am trying to find proper documentation, a blog, or any sample Github project.
Will you please let me know how you have resolved this issue.
All the sessions of the conference are now available online