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

Is it really possible to flatten the data with some duplication? #34

Open
josephIDM opened this issue Apr 6, 2020 · 0 comments
Open

Comments

@josephIDM
Copy link

I have a data structure like below

{
"MyAsset": {
"Code": "Cod123",
"MyAssetLocation": [{
"Location": {
"LocationName": "Location 1"
}
},{
"Location": {
"LocationName": "Location 2"
}
}
]
}
}
I wanted to write a graphql query against the entity MyAsset in such a way that it should return the data like below.

First record

{code:"Cod123",MyAssetLocation.Location:"Location 1"}
Second Record

{code:"Cod123",MyAssetLocation.Location:"Location 2"}
Basically I wanted to flatten the result by duplicating MyAsset details with MyAssetLocation.Location Items.

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