Skip to content

Add GraphQL endpoints

This PR adds a GraphQL endpoint and interactive GraphQL UI to DMD.

The aim of the GraphQL endpoints is to provide simplified querying of the underlying DMD data without needing to understand the data structures or necessary SQL.

In addition the GraphQL endpoints could be used in a GraphQL federation.

The initial endpoint is:

  • repositoriesLike which allows repositories that match a like query to be returned. The data returned will be:
    • totals of dependencies
    • total outdated dependencies
    • total deprecated dependencies
    • total unsupported dependencies
    • list of dependencies
    • list outdated dependencies
    • list deprecated dependencies
    • list unsupported dependencies

Outstanding work still to be done

  • add list outdated dependencies
  • include advisories into above queries
  • replicate repositoriesLike query as repositoriesIn query to allow multiple repositories to be queried
  • add dependentOnLike query to list repositories that depend on a specified dependency

Outstanding requests from maintainers:

  • add a separate dmd-graphql CLI entrypoint to allow running GraphQL as a standalone piece (i.e. for behind a reverse proxy)
  • add documentation to the documentation site, including an embedded version of the schema

Closes #151 (closed).

Edited by Jamie Tanna

Merge request reports