Raul
Raul

Reputation: 483

How attach resolvers for each field in Appsync and query after

I need you help.

Currently I'm working with AppSync, and I know how to create resolvers, pipelines, etc. But I don't know how to use the fields resolvers. For example, I attach a resolver for each field of my type, because some fields have different sources, but if I want to query the "type", I need to create a new resolver for the query operation "getCustomer"? what is the correct way to use the field resolvers?

Please if possible an example of each resolve in VTL.

enter image description here

Thanks for your help.

Upvotes: 0

Views: 1149

Answers (1)

T Caines
T Caines

Reputation: 253

Yes, you should create a resolver on the getCustomer query also.
This will be performed first and the results will be available in the context when resolving the field level resolvers.

Schema

Upvotes: 1

Related Questions