I created several custom mutations and queries as below and set their output to non-@model type.
type someOutput {
a : Int
b: String
}
type Mutation {
someMutation(
input: someInput!
): someOutput
@function(name: "lambdafunction-${env}")
@auth(rules: [{
allow: private
}])
}
When I test this in AppSync, a "Not Authorized to access on type" error occurs.
I couldn't solve it by setting globalAuthRule to public. It can be solved by granting field-level authorization to all fields.
Is there any way to grant permission to non-@model type without using field level authorization? Or should I write the schema some other way?
I am very confused because I have used schema written in the same way in other projects and used it well.