I'm building a graphql API on AWS using CDK, resolvers are custom lambdas. One type in my schema.graphql has got a field with its own inputs. The schema looks something like this.
type Output {
field1: Int!
field2: String
field3(input1: String!, input2: String!): Int
}
input MyInput {...}
type Mutation {
MyMutation(input: MyInput): Output
}
Currently I'm only declaring the main MyMutation resolver in the CDK script.
The arguments for field3 are inside event.info.selectionSetGraphQL, but are formatted as strings, like field3(input1: 'str1', input2: 'str2)\n.
Shouldn't I be able to get them in some sort of arguments field as an object as it is for the arguments of the top level MyMutationfield?
Is this because I'm not using field resolvers properly?
I could not find examples of nested graphql resolvers online. Is there a better way of doing this? Something like Apollo's resolver maps?
Thank you.