ALBANY — Mayor Bill de Blasio of New York spent his weekend surfing the rapids of the protests and outrage lashing the country over President Trump’s executive order on refugees. The mayor appeared on CNN. He spoke at a protest march in Battery Park City. He vowed, over and over, to safeguard immigrants.

For the first hour or so of his budget testimony in Albany on Monday, however, it seemed that the issue that had most rattled his constituents was a looming 5-cent fee on plastic bags in New York City, which state legislators have complained is unnecessarily punitive, especially for low-income residents.

There were visual aids, employed to score points on both sides — a loaf of Wonder Bread and a dozen eggs, held aloft to demonstrate the burden of grocery costs, and a gray reusable tote bag, displayed as a simple alternative to plastic — and even some alliterative jargon: “petroleum-based product,” Mr. de Blasio’s term for the bags.

“I fundamentally disagree that this is an issue that isn’t urgent to address in terms of climate change,” Mr. de Blasio told Senator Simcha Felder, a Brooklyn Democrat who caucuses with Senate Republicans and had brought the groceries.