You are here

public function QueryProvider::addQueryProvider in GraphQL 8.3

Adds a query provider.

Parameters

\Drupal\graphql\GraphQL\QueryProvider\QueryProviderInterface $provider: The query provider to add.

int $priority: Priority of the query provider.

File

src/GraphQL/QueryProvider/QueryProvider.php, line 44

Class

QueryProvider

Namespace

Drupal\graphql\GraphQL\QueryProvider

Code

public function addQueryProvider(QueryProviderInterface $provider, $priority = 0) {
  $this->providers[$priority][] = $provider;
  $this->sortedProviders = NULL;
}