I am trying to create a appsync resolver to query an aurora-postgresql database. I have created a Movie table and have the following mutations(postMovie) and Queries(listMovies, getMoviesByName, singleMovie). The mutation works just fine and so does the listMovies query but the getMoviesByName and singleMovie(retrieves a movie by id) is not working. The error with getMoviesByName is Error invoking method 'get(java.lang.Integer)' in java.util.ArrayList at velocity[line 4, column 51]
and the error with singleMovie is RDSHttp:{"message":"ERROR: operator does not exist: integer = character varying\n Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n Position: 30; SQLState: 42883"}
. I believe the issue is with the response template but I am not sure and new to appsync graphql. I created all these resources in Terraform. Please see the screenshots of the resources below.