What is the best option to query or mutate data with business logic from frontend?

0

At the moment, I am using AppSync GraphQL as a single endpoint to query or update data for a web app I am developing. I am planning to combine or execute some queries via Lambda for some tables that involve business logic as the one described in the scenario below. Just want to know if this is still best practise, should all queries be executed from AppSync OR Lambda? Can I combine them both? What would be the cheapest option with a great architecture?

Options:

A. Angular (frontend) > AppSync GraphQL > DynamoDB

B. Angular (frontend) > Lambda > DynamoDB

C. Angular (frontend) > API Gateway > Lambda > DynamoDB

App type: Social Network

Scenario: User A has blogs that can only be seen by followers. User B does not follow User A so no blogs should be displayed to User B.

Criteria for best option: Pricing, Performance, and Architecture best practises

1개 답변
0

You can look to use Lambda resolvers for executing business logic - https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠