# 0293-functions-get-graphql-setting

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

# get_graphql_setting

```php
get_graphql_setting( string $option_name, $default_value = '', $section_name = 'graphql_general_settings' );
```

Get an option value from GraphQL settings

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

## Parameters

- `$option_name` (`string`): The key of the option to return
- `$default_value` (`mixed`): The default value the setting should return if no value is set
- `$section_name` (`string`): The settings group section that the option belongs to

## Return

- `mixed|string|int|bool`

## Source

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

```php
function get_graphql_setting( string $option_name, $default_value = '', $section_name = 'graphql_general_settings' ) {
```