Creating child tasks for the issue with CLI or API


Creating child tasks for the issue with CLI or API

I’m looking on how to create “child issues” (or so called “Tasks”) for the issue, using cli or api/graphql.

Me and my friend created a repo for daily practicing leetcode (kind-of daily routine for brains), and we use some Gitlab features to keep track of what we do and make it looks nice.

So our current workflow is the next:

  1. We take 1 task from leetcode
  2. Create an issue for the repo with the task description
  3. Create child task with the assignee to each of us to solve that task with the programming language of our choice
  4. Peer-review each others solutions, to sync on algorithmic approach used and to keep updated on syntax of different programming language.

So currently we able to automate parts 1 and 2 using cli tools (leetcode and glab).

For building child issues, I didn’t find how to do that with glab cli, so currently I still doing that manually.
I spent some time investigating GraphQL and seems it’s possible to do that (at least I tracked some GraphQL request for that use “Web developers tools” in Browser).

There is an issue and script draft for that: Create some automation (#2) · Issues · group-coding / Leetcode · GitLab

It looks like I’m on the final step to make it works, just need some hint on how to fix my GraphQL query.
Did anyone use that? Any obvious issue I miss in my approach?


Please select whether options apply, and add the version information.


  • GitLab Enterprise Edition 17.1.0-pre <small>[91ba53eb7c5](</small>