src/GraphQL/Type/InterfaceType.php 1 location
|
@@ 59-65 (lines=7) @@
|
56 |
|
'type' => $type, |
57 |
|
]; |
58 |
|
|
59 |
|
uasort($this->types, function (array $a, array $b) { |
60 |
|
if ($a['weight'] === $b['weight']) { |
61 |
|
return 0; |
62 |
|
} |
63 |
|
|
64 |
|
return ($a['weight'] < $b['weight']) ? 1 : -1; |
65 |
|
}); |
66 |
|
} |
67 |
|
|
68 |
|
/** |
src/Plugin/GraphQL/PluggableSchemaBuilder.php 1 location
|
@@ 99-105 (lines=7) @@
|
96 |
|
} |
97 |
|
|
98 |
|
// Sort the plugins so that the ones with higher weight come first. |
99 |
|
usort($items, function (array $a, array $b) { |
100 |
|
if ($a['weight'] === $b['weight']) { |
101 |
|
return 0; |
102 |
|
} |
103 |
|
|
104 |
|
return ($a['weight'] < $b['weight']) ? 1 : -1; |
105 |
|
}); |
106 |
|
|
107 |
|
// @TODO: Add support configurable plugins. |
108 |
|
return array_map(function (array $item) { |