I wrote it using a framework whose most recent release is substantially different than what GPT-4 was trained on.
I quickly learned to just paste the docs and examples from the new framework to GPT, telling it "this is how the API looks now" and it just worked.
It helped me do everything. From writing the code, to setting up SSL on nginx, to generating my DB schema, to getting my DB schema into the prod db (I don't use migration tooling).
Most of my time was spent telling GPT "sorry, that API is out of date --- use it like this, instead". Very rarely did GPT actually produce incorrect code or code that does the wrong thing.