@@ 207-214 (lines=8) @@ | ||
204 | * |
|
205 | * @return \Drupal\graphql\Plugin\GraphQL\Types\TypePluginBase |
|
206 | */ |
|
207 | protected function buildType($type) { |
|
208 | if (!isset($this->types[$type['id']])) { |
|
209 | $creator = [$type['class'], 'createInstance']; |
|
210 | $this->types[$type['id']] = $creator($this, $this->typeManagers[$type['type']], $type['definition'], $type['id']); |
|
211 | } |
|
212 | ||
213 | return $this->types[$type['id']]; |
|
214 | } |
|
215 | ||
216 | /** |
|
217 | * @param $field |
|
@@ 221-228 (lines=8) @@ | ||
218 | * |
|
219 | * @return mixed |
|
220 | */ |
|
221 | protected function buildField($field) { |
|
222 | if (!isset($this->fields[$field['id']])) { |
|
223 | $creator = [$field['class'], 'createInstance']; |
|
224 | $this->fields[$field['id']] = $creator($this, $this->fieldManager, $field['definition'], $field['id']); |
|
225 | } |
|
226 | ||
227 | return $this->fields[$field['id']]; |
|
228 | } |
|
229 | ||
230 | /** |
|
231 | * @param $mutation |
|
@@ 235-242 (lines=8) @@ | ||
232 | * |
|
233 | * @return mixed |
|
234 | */ |
|
235 | protected function buildMutation($mutation) { |
|
236 | if (!isset($this->mutations[$mutation['id']])) { |
|
237 | $creator = [$mutation['class'], 'createInstance']; |
|
238 | $this->mutations[$mutation['id']] = $creator($this, $this->mutationManager, $mutation['definition'], $mutation['id']); |
|
239 | } |
|
240 | ||
241 | return $this->mutations[$mutation['id']]; |
|
242 | } |
|
243 | ||
244 | /** |
|
245 | * @return array |