Sauté onions in butter until translucent in color.
Add garlic and cook for an additional minute.
Add flour and stir, cooking until golden brown.
Add chicken stock, slowly whisking liquid into flour mixture.
Add heavy cream and reduce heat to simmer.
Add cheese, stirring until melted. Once cheese is melted, add beer.
Finish with salt and pepper to taste.