// First returns the first FactType entity from the query.
// Returns a *NotFoundError when no FactType was found.
First returns the first FactType entity from the query.
Returns a *NotFoundError when no FactType was found.
// First returns the first FactType entity from the query . // Returns a * NotFoundError when no FactType was found .
func (ftq *FactTypeQuery) First(ctx context.Context) (*FactType, error) {
	nodes, err := ftq.Limit(1).All(ctx)
	if err != nil {
		return nil, err
	}
	if len(nodes) == 0 {
		return nil, &NotFoundError{facttype.Label}
	}
	return nodes[0], nil
}
func ( ftq * FactTypeQuery ) First ( ctx context . Context ) ( * FactType , error ) { nodes , err := ftq . Limit ( 1 ) . All ( ctx ) if err != nil { return nil , err } if len ( nodes ) == 0 { return nil , & NotFoundError { facttype . Label } } return nodes [ 0 ] , nil }
First returns the first FactType entity from the query.
First returns the first FactType entity from the query .