Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/router/access-logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The default log fields provide essential details about each HTTP request. These

* **path**: The request path (e.g., `/graphql`).

* **query**: The query string included in the request URL (e.g., `/?param=1`).
* **query**: The query string included in the request URL (e.g., `/?param=1`). Certain parameters can be skipped using the [ignore_query_params_list](#filtering-query-parameters) option.

* **ip**: The client’s IP address (redacted by default).

Expand Down Expand Up @@ -106,6 +106,20 @@ An example of a log entry is shown below:
}
```

#### Filtering Query Parameters

The `query` field above by default will print the raw query string if present. However, this can potentially include sensitive information, especially if the GraphQL request was made over GET. Users can ignore specific query parameters using the following configuration, which will skip printing the "extensions" query parameter:
Comment thread
StarpTech marked this conversation as resolved.

```yaml
access_logs:
router:
ignore_query_params_list:
- "extensions"
```

Note that if no `ignore_query_params_list` is specified, "variables" is ignored by default.


## Custom Fields

In addition to the default fields, you can extend the log with custom fields. These can include values extracted from request headers or additional information generated after the GraphQL operation has been processed.
Expand Down
Loading