Jon Saw
Jon Saw
Got it to work based on the example found on [AWS](https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#returning-individual-errors). First, by having a custom error: ``` type ErrorHandler struct { Type string `json:"error_type"` Message string `json:"error_message"` } ```...
Another option would be to include `ErrorType` and `ErrorMessage` in the model: ``` // Project model structure type Project struct { ProjectID string `json:"project_id"` Featured bool `json:"featured,omitempty"` ImageSrc050 string `json:"image_src_050,omitempty"`...
Based on your feedback, something like this? Handler: ```golang package handlers // imports removed func CreateProject(project models.Project) (interface{}, error) { now := time.Now() project.CreatedAt = &now project.UpdatedAt = &now err...
How about introducing the concept of middleware? Similar to how it's done with [Goji](https://goji.io/) or [Gorilla](http://www.gorillatoolkit.org/pkg/mux#MiddlewareFunc). ```golang package main import ( // removed ) var ( r = resolvers.New() )...
Dabbled at the idea of having a middleware. This would allow users to further extend this awesome package. Still prelim, but you can find some example applications in this [fork](https://github.com/jonsaw/appsync-resolvers/blob/middleware-intro/middleware_test.go).
Hi @msaliminia, technically should be possible with this SDK (but I have not tested). This package is modeled after the [amazon-cognito-identity-js](https://github.com/aws-amplify/amplify-js/tree/master/packages/amazon-cognito-identity-js) package. Any examples that work there will likely work...
Thanks for the PR @ncb000gt. I'll try to find some time this week to look into this. Been super busy on my end here -- sorry for the late responses.
Thanks for the find + feedback. Will look into it!
Sorry for the late reply. Is your setup close to the one found on [Serverless Stack](https://serverless-stack.com/chapters/create-a-cognito-user-pool.html)?
Hey guys, I'm really sorry for the slowness in response. I'm really busy with other stuff at the moment. I'm definitely open for any collaboration!