You are here

public function Server::removePersistedQueryInstance in GraphQL 8.4

Removes a Persisted Query plugin instance from the persisted queries set.

Parameters

string $queryPluginId: The plugin id to be removed.

Overrides ServerInterface::removePersistedQueryInstance

File

src/Entity/Server.php, line 389

Class

Server
The main GraphQL configuration and request entry point.

Namespace

Drupal\graphql\Entity

Code

public function removePersistedQueryInstance($queryPluginId) : void {

  // Make sure the persistedQueryInstances are loaded before trying to remove
  // a plugin from them.
  if (is_null($this->persisted_query_instances)) {
    $this
      ->getPersistedQueryInstances();
  }
  unset($this->persisted_query_instances[$queryPluginId]);
}