- Run
npm install
- Run
npm run start:transformed
- Go to
http://localhost:4000
- Klick on the button to go to Apollo Studio
The following query works as expected
query Test {
xx_missions {
payloads {
orbit_params {
eccentricity
}
}
}
}
Results
{
"data": {
"xx_missions": [
{
"payloads": [
{
"orbit_params": {
"eccentricity": 0.0001981
}
},
{
"orbit_params": {
"eccentricity": 0.0001844
}
}
]
},
{
"payloads": [
{
"orbit_params": {
"eccentricity": 0.0002221
}
},
{
"orbit_params": {
"eccentricity": 0.0001916
}
}
]
}
// ...
]
}
}
The and returns data all the way down to eccentricity
.
But once we alias payloads
, it will always return null
:
query Test {
xx_missions {
myPayloads: payloads {
orbit_params {
eccentricity
}
}
}
}
Results
{
"data": {
"xx_missions": [
{
"myPayloads": null
},
{
"myPayloads": null
},
// ...
]
}
}
In this case all the fields are optional, but if they aren’t the query will fail, but even with optional fields, this is not the expected behavior.
You can get the untransformed version by running npm run start:untransformed
.