Setting weights, costs, and rate limits
Recall that when your GraphQL schema was established, every field had a resolver. The resolver would fetch the type and populate the field. The resolver could call a database query, a Kafka event, or maybe even another API. How these fetch actions perform should be a concern of yours. For instance, what if the backend resolver requires an extensive query to a database and performance lags? Also, since your graph may have many fields, you could be calling multiple databases and possibly yours or third-party APIs. These are all good reasons why you need to consider how you establish rate limits, as well as determine the cost of your GraphQL queries. Everything has a cost. Luckily for you, the API Connect gateway parses the GraphQL query and determines a cost based on the weights you establish. Let's check these out in the following sections.
Considerations on performance
Understanding what is happening on the backend GraphQL server is...