steep-lamp-20408
10/24/2022, 8:08 AMtype Mutation @aws_api_key @aws_oidc {
inviteUser(
email: String!
organizationId: ID!
referrerUserId: ID!
): User
}
...and here is my resolver creation Pulumi code, knowing the Appsync API (my_appsync_api
) lambda and its datasource (my_lambda_datasource
) are already created successfully:
import pulumi_aws as aws
my_resolver = aws.appsync.Resolver(
"my-resolver",
api_id=my_appsync.id,
type="Mutation",
field="inviteUser",
data_source=my_lambda_datasource.name,
request_template="""
{
"version": "2017-02-28",
"operation": "Invoke",
"payload": {
"arguments": $utils.toJson($ctx.args)
}
}
""",
response_template="""
## Raise a GraphQL field error in case of a datasource invocation error
#if($ctx.error)
$util.error($ctx.error.message, $ctx.error.type)
#end
$util.toJson($ctx.result)
""",
)
On Pulumi up, I get the error: error creating AppSync Resolver: NotFoundException: No field named inviteUser found on type Mutation
What is/should be field
in the case of direct invocation? Any idea?