You are here

protected function SchemaProvider::getSortedProviders in GraphQL 8.2

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

Returns the sorted array of schema providers.

Return value

\Drupal\graphql\SchemaProviderInterface[] An array of schema provider objects.

2 calls to SchemaProvider::getSortedProviders()
SchemaProvider::getMutationSchema in src/SchemaProvider.php
SchemaProvider::getQuerySchema in src/SchemaProvider.php

File

src/SchemaProvider.php, line 60

Class

SchemaProvider
Generates a GraphQL Schema.

Namespace

Drupal\graphql

Code

protected function getSortedProviders() {
  if (!isset($this->sortedProviders)) {
    krsort($this->providers);
    $this->sortedProviders = [];
    foreach ($this->providers as $providers) {
      $this->sortedProviders = array_merge($this->sortedProviders, $providers);
    }
  }
  return $this->sortedProviders;
}