@@ 307-314 (lines=8) @@ | ||
304 | * @return array |
|
305 | * The field definition. |
|
306 | */ |
|
307 | protected function buildField($field) { |
|
308 | if (!isset($this->fields[$field['id']])) { |
|
309 | $creator = [$field['class'], 'createInstance']; |
|
310 | $this->fields[$field['id']] = $creator($this, $this->fieldManager, $field['definition'], $field['id']); |
|
311 | } |
|
312 | ||
313 | return $this->fields[$field['id']]; |
|
314 | } |
|
315 | ||
316 | /** |
|
317 | * Retrieves the mutation definition for a given field reference. |
|
@@ 325-332 (lines=8) @@ | ||
322 | * @return array |
|
323 | * The mutation definition. |
|
324 | */ |
|
325 | protected function buildMutation($mutation) { |
|
326 | if (!isset($this->mutations[$mutation['id']])) { |
|
327 | $creator = [$mutation['class'], 'createInstance']; |
|
328 | $this->mutations[$mutation['id']] = $creator($this, $this->mutationManager, $mutation['definition'], $mutation['id']); |
|
329 | } |
|
330 | ||
331 | return $this->mutations[$mutation['id']]; |
|
332 | } |
|
333 | ||
334 | /** |
|
335 | * {@inheritdoc} |