Search code examples
amazon-web-servicesaws-appsync

What's the price for a query operation in AppSync if there is nested resolver?


Based on aws appsync pricing https://aws.amazon.com/appsync/pricing/

If I have a User object that has many Post relations and I would like to query a list of User with a list of Post objects for each User. Will this query be counted as 1 operation? Or will it be counted as 1 operation for 1 User and for each Post query per User is counted as 1 as well (essentially n Users operations or n + 1 operations)?


Solution

  • AWS AppSync charges you for the # of GraphQL operations (each request could be a GraphQL query/mutation), and on the # of of Real-time updates and connected minutes in case of GraphQL subscriptions.

    So, it does not matter whether you are querying nested data with multiple levels, AppSync only charges you once per GraphQL operation. Please keep in mind that you may be charged additionally by the underlying DataSources.