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 your OpenAPI source; for details on how to configure the policy in the assembly user interface, see GraphQL Cost Analysis.
Properties
Property | Required | Description | Data type |
---|---|---|---|
version | Yes | The policy version number. | string |
title | No | The title of the policy. | 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 |