Can't use GraphQL API to move a project card to the top -- docs are wrong?

I’ve written a script that sorts the cards in our TODO project column: GitHub Project Card Sorter using GraphQL API · GitHub

The moveProjectCard mutation takes a MoveProjectCardInput, says that you can pass null to afterCardId to put the card at the top. However, if I pass null as the docs say, I get this error:

GraphqlResponseError: Request failed due to following response errors:
 - Could not resolve to a node with the global id of 'null'
    at node_modules/@octokit/graphql/dist-node/index.js:81:13
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async main (index.js:83:7)

Passing a valid card ID works fine, however.

@andreagriffiths11 Sorry for the ping, but I’m not sure if I filed this in the right place.