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

Make OneToOne releations bi-directional #190

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Conversation

belopash
Copy link
Contributor

No description provided.

@eldargab
Copy link
Collaborator

What is the case which bothered you enough to make a PR? :)

@belopash
Copy link
Contributor Author

belopash commented Aug 6, 2023

@eldargab missed the comment

type Account @entity {
    id: ID!
    publicKey: ID! @index
    stashOf: Staker @derivedFrom(field: "stash")
    controllerOf: Staker @derivedFrom(field: "controller")
}

type Staker @entity {
    id: ID!
    stash: Account! @unique
    controller: Account @unique

    ...
}

need to query account in code to get controllerOf relation

@belopash
Copy link
Contributor Author

belopash commented Aug 6, 2023

for now I patched it locally, so it's not urgent

@belopash belopash merged commit 56ed1df into master Apr 9, 2024
1 check passed
@belopash belopash deleted the bi-directional-oto branch April 9, 2024 17:23
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

Successfully merging this pull request may close these issues.

2 participants