GraphQL Cost Analysis
Use the GraphQL Cost Analysis policy to return a cost analysis of a target query.
Gateway support
Gateway | Policy version |
---|---|
DataPower® API Gateway | 2.0.0 |
This topic describes how to configure the policy in the assembly user interface; for details on how to configure the policy in your OpenAPI source, see graphql-cost-analysis.
Properties
The following table lists the policy properties, indicates whether a property is required, specifies the valid and default values for input, and specifies the data type of the values.
Property label | Required | Description | Data type |
---|---|---|---|
Title | No | The title of the policy. The default value is |
string |
Description | No | A description of the policy. | string |
Input | No |
A variable in the API context that contains the input to the GraphQL cost analysis. The content
of the body field of the variable is the GraphQL cost query. By default, the variable name is
|
string |
Output | No |
A variable in the API context where the results of the GraphQL cost analysis are stored. The content of the body field of the variable is the result of GraphQL cost analysis. The default variable name is the same as that of the variable specified for the input field. Therefore, by default, the input of the GraphQL cost analysis is overwritten by the output. |
string |
Target | No |
A variable in the API context that contains the target for the GraphQL cost analysis. The content
of the body field of the variable is the GraphQL context. By default, the variable name is
|
string |