src/Rebing/GraphQL/Support/SelectFields.php
protected static function addAlwaysFields($fieldObject, array &$select, $parentTable, $forRelation = false)
    {
        if(isset($fieldObject->config['always']))
        {
            $always = $fieldObject->config['always'];

            if(is_string($always))
            {
                $always = explode(',', $always);
            }

            // Get as 'field' => true
            foreach($always as $field)
            {
                self::addFieldToSelect($field, $select, $parentTable, $forRelation);
            }
        }
    }
protected static function addAlwaysFields($fieldObject, array &$select, $parentTable, $forRelation = false)
    {
        if(isset($fieldObject->config['always']))
        {
            $always = $fieldObject->config['always'];

            if(is_string($always))
            {
                $always = explode(',', $always);
            }

            // Get as 'field' => true
            foreach($always as $field)
            {
                self::addFieldToSelect($field, $select, $parentTable, $forRelation);
            }
        }
    }
protected static function addAlwaysFields ( $ fieldObject , array & $ select , $ parentTable , $ forRelation = false ) { if ( isset ( $ fieldObject -> config [ 'always' ] ) ) { $ always = $ fieldObject -> config [ 'always' ] ; if ( is_string ( $ always ) ) { $ always = explode ( ',' , $ always ) ; } // Get as 'field' => true foreach ( $ always as $ field ) { self :: addFieldToSelect ( $ field , $ select , $ parentTable , $ forRelation ) ; } } }
Add selects that are given by the 'always' attribute
Add selects that are given by the always attribute