According to the IRS: "You are in the business of farming if you cultivate, operate, or manage a farm for profit, either as owner or tenant. A farm includes livestock, dairy, poultry, fish, fruit, and truck farms. It also includes plantations, ranches, ranges, and orchards and groves."
The key is your farm being a "business". In other words, you farm to make a profit and not just as a hobby.
You may then be entitled to the QBI deduction of up to 20 percent, subject to various limitations.
For additional information, you can review the Schedule F Instructions.