[BE] GraphQL for Vulnerability Details Dependency Paths

Why are we doing this work

The initial implementation for Support dependency graph visuals (&16815 - closed) added a new dependency_paths field to the Dependency List (project level, group level) and Vulnerability Details page level queries. The dependency paths display in a new side bar, which shown when clicking a "View dependency paths" button.

To improve performance and introduce limits, the Dependency Path list should use pagination.

This issue tracks backend scope to:

  1. Create a new GraphQL query for vulnerabilities' dependency paths
  2. Include dependencies key in VulnerabilityType
  3. Include dependencies.dependencyPaths in VulnerabilityType
  4. Support pagination parameters

Example query:

{
    vulnerabilities {
       nodes{
         id
         dependencies{
           nodes {
             id
             name
             version
             dependencyPaths(first: 50, after: "WzEsMiwzLDQsNV0=") {
               nodes {
                 path {
                   name
                   version
                 }
               }
             }
           }
         }
       }
     }
   }
  }
}

Discussion at &16815 (comment 2557174974)

Relevant links

Verification steps

Edited by Lucas Charles