Costco Wholesale (COST -0.75%) has proven to be a resilient business over the past few years. Pandemic-induced spending led to incredible results, and even as inflation has been rising this year, the company's numbers still looked strong. But in recent months, there have been cracks that have finally started to show. And the company's first-quarter results have confirmed that Costco's growth rate is indeed slowing down.

Does this mean the stock's glory days are over and investors should expect a sell-off next year -- or is Costco a good buy on the dip?

Sales growth is no longer in double digits

It wasn't long after I pointed out Costco's impressive growth streak that the company finally came back down to Earth and reported comparable sales growth of less than 10% in its monthly reports. After staying just above 10% for the month of August, Costco's comparable sales numbers increased by just 8.5% the following month. And by November, they had nosedived even lower to 4.3%.

The company's most recent quarterly results covered the period up until Nov. 20, and revenue of $54.4 billion during that stretch rose by 8.1% year over year. But rising costs have chipped away at its bottom line, and net income of $1.4 billion for the period increased by a more modest rate of 3%.

While the business is still generating growth, it looks as though rising costs and inflationary pressures are finally catching up to demand. For the quarter, the company even reported negative comparable growth in e-commerce (-3.7%) and international markets outside of Canada and the U.S. (-3.1%).

Why this could be a problem for the stock

For a while now, the economy has appeared to be operating on borrowed time, with consumers somehow still being able to spend amid soaring inflation. If Costco, which has been known for its impressive growth over the past few years, is finally showing signs of weakness, this could be one of the early indicators that the economy may finally be headed for some trouble. And if that's what's happening, slower growth rates could become the norm for Costco in 2023.

That poses a problem for investors because if the growth rate is more modest, then it could be much more difficult to justify buying shares of a stock that trades at a hefty 37 times earnings. That's nowhere near the S&P 500 average of 19. Not only is it expensive right now, but the risk is that if sales growth and earnings decline next year, then that multiple is only going to get worse.

Should you buy Costco's stock?

Since the start of the month, Costco's stock has declined by more than 9%, while the S&P has fallen by just 2%. Costco is suddenly not the infallible retail business that it looked to be just a few months ago, and the danger is that it could have a long way to fall. Prior to the pandemic, the stock's price-to-earnings ratio had a 10-year average of 27. Without a strong growth rate next year, it could sink back to those levels. Combine that with potentially softer profits, and a sell-off wouldn't be out of the question.

If you're a long-term investor who has many investing years left, you could simply hang on to the stock as it offers a growing dividend and still has a solid business. But if you haven't invested in the stock just yet, I wouldn't do so right now as 2023 could see a sharp decline in Costco's price, which would make it a much better buy.