CodeQL CLI includes a language server which can be easily set up in coc.nvim by adding the content of this coc-settings.json file to your own configuration file:

{
  "languageserver":{
    "codeql": {
      "command": "codeql",
      "args": [
        "execute",
        "language-server",
        "--check-errors",
        "ON_CHANGE",
        "-q"
      ],
      "filetypes": [
        "codeql",
        "ql"
      ],
      "initializationOptions": {},
      "settings": {}
    }
}

Given that coc.nvim uses Vim filetype detection system and not file extensions, you need to let Vim know about *.ql files being CodeQL files. One way to do that is to add codeql.vim to ~/.vim/ftdetect:

" Set '.ql' files as CodeQL files.
au BufRead,BufNewFile *.ql set filetype=codeql