# 0227-filters-graphql-query-id-hash-algorithm

<!--
This file is auto-generated by scripts/hooks/generate-hook-docs.js.
Do not edit manually.
-->
---
title: graphql_query_id_hash_algorithm
hookType: filter
hookGroup: request-lifecycle
plugin: wp-graphql
---

# graphql_query_id_hash_algorithm

```php
apply_filters( 'graphql_query_id_hash_algorithm', 'sha256' );
```

Filter the hash algorithm to allow different algorithms.

- **Type:** filter
- **Group:** Request Lifecycle
- **Since:** 0.0.2
- **Source File:** `plugins/wp-graphql/src/Utils/Utils.php`

## Parameters

- `$algorithm` (`string`): Default is sha256. Possible values are those that work with the PHP hash() function. See: https://www.php.net/manual/en/function.hash-algos.php

## Source

- [`plugins/wp-graphql/src/Utils/Utils.php:26`](https://github.com/wp-graphql/wp-graphql/blob/main/plugins/wp-graphql/src/Utils/Utils.php#L26)

```php
apply_filters( 'graphql_query_id_hash_algorithm', 'sha256' );
```

## Related

- `Utils::get_query_id()` in [`plugins/wp-graphql/src/Utils/Utils.php:26`](https://github.com/wp-graphql/wp-graphql/blob/main/plugins/wp-graphql/src/Utils/Utils.php#L26)