Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timebased versioning with @relation-objects #203

Open
cmartin81 opened this issue Oct 7, 2020 · 0 comments
Open

Timebased versioning with @relation-objects #203

cmartin81 opened this issue Oct 7, 2020 · 0 comments

Comments

@cmartin81
Copy link

cmartin81 commented Oct 7, 2020

Hi, I'm following this pattern here: https://medium.com/neo4j/keeping-track-of-graph-changes-using-temporal-versioning-3b0f854536fa. Let say that we have 2 nodes with the labels Product and ProductState. The Product label contains only an ID and the ProductState label have information regarding name and price. The relationship between the nodes have the fields 'to' and 'from'.

I want to create a schema where I can see the changes over time and use the directive @relation (productTimeline)

type Product {
  id:ID!
  productTimeline: [ProductTimeline]
}

type ProductState {
  name: String
  price: Int
}

type ProductTimeline {
  from: Product
  to: ProductState
  #  <here I want to display the to and from field that is inside the relationship between the nodes, but these field are already used>
}

This works fine, but I cannot display the to and from fields that are inside the relationship. How can I solve this without renaming the fields inside the relationship?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant