# 0327-functions-rename-graphql-type

<!--
This file is auto-generated by scripts/functions/generate-function-docs.js.
Do not edit manually.
-->
---
title: rename_graphql_type
docType: function
plugin: wp-graphql
---

# rename_graphql_type

```php
rename_graphql_type( string $type_name, string $new_type_name ): void;
```

Renames a GraphQL Type in the Schema.

- **Since:** 1.3.4
- **Source File:** `plugins/wp-graphql/access-functions.php`

## Parameters

- `$type_name` (`string`): The name of the Type in the Schema to rename.
- `$new_type_name` (`string`): The new name to give the Type.

## Throws

- `\Exception`

## Source

- [`plugins/wp-graphql/access-functions.php:498`](https://github.com/wp-graphql/wp-graphql/blob/main/plugins/wp-graphql/access-functions.php#L498)

```php
function rename_graphql_type( string $type_name, string $new_type_name ): void {
```