Skip to content

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

Open
@josephIDM

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions