# 0244-filters-graphql-root-value

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

# graphql_root_value

```php
apply_filters( 'graphql_root_value', $root_value, $this );
```

Return the filtered root value

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

## Parameters

- `$root_value` (`mixed|RootValueResolver`): The root value the Schema should use to resolve with. Default null.
- `$request` (`\WPGraphQL\Request`): The Request instance

## Source

- [`plugins/wp-graphql/src/Request.php:244`](https://github.com/wp-graphql/wp-graphql/blob/main/plugins/wp-graphql/src/Request.php#L244)

```php
apply_filters( 'graphql_root_value', $root_value, $this );
```

## Related

- `Request::get_root_value()` in [`plugins/wp-graphql/src/Request.php:244`](https://github.com/wp-graphql/wp-graphql/blob/main/plugins/wp-graphql/src/Request.php#L244)