diff --git a/docs/source/api/plugin/usage-reporting.md b/docs/source/api/plugin/usage-reporting.md index f0106574136..d66fad52d4c 100644 --- a/docs/source/api/plugin/usage-reporting.md +++ b/docs/source/api/plugin/usage-reporting.md @@ -356,7 +356,7 @@ Specify this function to create a signature for a query. This option is not reco | `{ all: true }` | If you provide this object, **all** GraphQL variable values are sent to Apollo Studio. | | `{ onlyNames: ["apple", "orange"]}`| If you provide an object with this structure, only values of the GraphQL variables with names that appear in the array are sent to Apollo Studio. Case-sensitive. | | `{ exceptNames: ["apple", "orange"]}`| If you provide an object with this structure, all GraphQL variable values **except** values of variables with names that appear in the array are sent to Apollo Studio. Case-sensitive. | -| `{ transform: ({ variables, operationString)} => { ... } }` |

The value of `transform` is a function that takes the values of all GraphQL variables for an operation. The function should modify or delete necessary values in the `variables` map and return the result. You cannot _add_ variables to the map.

For security reasons, if an error occurs in the `transform` function, **all** variable values are replaced with `[PREDICATE_FUNCTION_ERROR]`. | +| `{ transform: ({ variables, operationString)} => { ... } }` |

The value of `transform` is a function that takes the values of all GraphQL variables for an operation and the operation string. The function return a new variables map containing values for the operation's variables that should be sent to Apollo Studio. This map does not need to contain all of the operation's variables, but cannot _add_ variables to the map. You should not mutate `variables` itself or any of the values contained in it.

For security reasons, if an error occurs in the `transform` function, **all** variable values are replaced with `[PREDICATE_FUNCTION_ERROR]`. | #### Valid `sendHeaders` object signatures