## You ask: 

> if booming blade or green flame blade are counter-spelled, does the
> attack still go through?

### I answer

> if booming blade or green flame blade are counter-spelled,

You have discovered that your enemy is a fool.  Feast upon them.  

The economics of this transaction: your enemy has traded a spell slot, level 3, for a spell slot, level 0.  
You just won.  
You suckered the enemy into wasting a counterspell on a 0 level spell (cantrip) that you can cast again on the next round, for a 3d level spell slot that is a limited resource.  And now, next round, the enemy usually can't counterspell the Hold Person that your cleric is going to throw, or some other spell from level 1 through 9, depending on your tier of play and your team's composition.   

### Caveat: enemies with dispel magic as an ability, not a spell slot
In the case of that rare monster like a glabrezu or ultraloth

> At will: ... *dispel magic*

whose *dispel magic* is for all intents and purposes a cantrip, you've discovered that the glabezru or ultraloth is on to your game and you need to change your approach.   And you did so without burning a spell slot.  👍

Of course, when fighting beings at that high of a CR,  perhaps getting them to use an action to cast *dispel magic* on a cantrip prevents something nastier from being inflicted on your party, and your enemy isn't using their best abilities to drive you off or slay you (the PCs).