Is there a way in apollo-graphql to define name of the field from values passed in input? Something like below, how to define key[i] here?
type response{
key[0] : {
field1 : String,
field2 : String
}
where input is
input request {
Keys: [String]
}
response of rest call that I am trying to read
{
"plan" : {
"key1" : {
field1 : "value1"
field2 : "value2"
},
"key2" : {
field1 : "value1"
field2 : "value2"
}
}
}