You are here

public function SchemaProvider::addSchemaProvider in GraphQL 8.2

Same name and namespace in other branches
  1. 8 src/SchemaProvider.php \Drupal\graphql\SchemaProvider::addSchemaProvider()

Adds a active theme negotiation service.

Parameters

\Drupal\graphql\SchemaProviderInterface $provider: The schema provider to add.

int $priority: Priority of the schema provider.

File

src/SchemaProvider.php, line 49

Class

SchemaProvider
Generates a GraphQL Schema.

Namespace

Drupal\graphql

Code

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