Show Json data fields from view as a child in graphql #3064
Unanswered
kedarkulkarni78
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am a newbie so need help.
I have complex data structure but for simiplicity following is what I have. All Data fields are Json type
Company = {id (int), Data (Json)}
vwCompany = {id, CompanyName, CompanyHq, CompanyAddress} => all Company fields from Data Json.
Directors = {id (int), CompanyId {int}, Data (Json)}
vwDirectors = {id, CompanyId, DirectorName, DirectorSurname } => all director fields from DataJson
I want to show this as a one to many relationship but when I try to set one to many relationship between Company => vwDirectors or vwCompany => vwDirectors etc, it does not work.
How can I design this so that graphql works where Company and vwDirectors works as a parent child relationship.. I was able to see data for API route and it executes sp. I am expecting it to run
I tried with view but get error as views are not supported for relationships.
I tried with stored proc but it complains for relationship node.
Has anyone tried to make it work. The view has same primary key from table.. Is there a public repo that I has any examples.
Beta Was this translation helpful? Give feedback.
All reactions