/**
  * @param ContainerContext $containerContext
  */
 private function guessFields(ContainerContext $containerContext)
 {
     foreach ($containerContext->getContainer()->getFields() as $field) {
         $fieldContext = $containerContext->createFieldContext($field);
         $this->guessFieldType($fieldContext);
         $this->guessFieldResolveConfig($fieldContext);
     }
 }
Esempio n. 2
0
 /**
  * @param Field           $field
  * @param FieldContainer  $container
  * @param SchemaContainer $schema
  */
 public function __construct(Field $field, FieldContainer $container, SchemaContainer $schema)
 {
     $this->field = $field;
     parent::__construct($container, $schema);
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function guessTypeResolveConfig(ContainerContext $containerContext)
 {
     return $this->guessResolveConfig($containerContext->getContainer()->getResolveConfig());
 }
Esempio n. 4
0
 /**
  * @param ContainerContext $containerContext
  * @return bool
  */
 private function isFieldContainerSupported(ContainerContext $containerContext)
 {
     $fieldContainer = $containerContext->getContainer();
     if (!$fieldContainer instanceof Type && !$fieldContainer instanceof InterfaceType) {
         return false;
     }
     return !empty($fieldContainer->getModel());
 }