Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Increase GraphQL Limit

Increase GraphQL Limit is a small WordPress plugin that raises WPGraphQL's maximum connection query amount to 1,000. It never lowers a larger limit set by another plugin or by site code.

Features

  • Raises WPGraphQL's graphql_connection_max_query_amount value to 1,000
  • Preserves any higher limit already configured elsewhere
  • Supports configuration through a constant or WordPress filter
  • Adds no settings, database records, scripts, styles, or tracking

Requirements

  • WordPress 6.0 or newer
  • PHP 7.4 or newer
  • WPGraphQL

Installation

  1. Download increase-graphql-limit-1.0.0.zip from the latest GitHub release.
  2. In WordPress, open Plugins > Add New > Upload Plugin.
  3. Select the ZIP, install it, and activate Increase GraphQL Limit.

You can also clone this repository into wp-content/plugins/increase-graphql-limit.

Configuration

The default target is 1,000. To configure it before WordPress loads plugins, define a positive integer in wp-config.php:

define( 'CODED_LETTER_GRAPHQL_CONNECTION_LIMIT', 500 );

Alternatively, filter the target in site code:

add_filter(
	'coded_letter_graphql_connection_limit',
	static function () {
		return 500;
	}
);

The plugin returns the greater of WPGraphQL's current limit and the configured target, so it will not undo a higher limit.

Performance and security

A larger connection limit lets clients request more nodes in one query and can increase database, memory, and response-time costs. Choose a limit appropriate for your hosting capacity, use persisted or allow-listed queries where appropriate, and apply authentication and rate limiting at the API edge. This plugin changes only the connection amount; it does not bypass WPGraphQL's other query analysis controls.

Development

The production source is maintained in the coded-letter-monorepo and released to this public repository. The plugin has no build step.

Validate PHP changes with:

php -l increase-graphql-limit.php
php -l includes/superfunky-release-client.php
php -l includes/superfunky-update-client.php

License

Increase GraphQL Limit is free software licensed under the GNU General Public License v2.0 or later.

About

Safely raise WPGraphQL's maximum connection query amount without lowering existing limits.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages