Page MenuHomeSoftware Heritage

Split the code of the public API from the frontent code in swh-web
Closed, MigratedEdits Locked

Event Timeline

douardda triaged this task as Normal priority.Feb 18 2022, 10:49 AM
douardda created this task.

A probable path for this would be:

  • publish the new GraphQL API as a standalone project (GraphQL
  • implement the v1 API on the top of the GraphQL API
  • remove public API code from swh-web

@douardda Thanks. This is mostly doable this way, but all the v1 api endpoints will not be available as GraphQL types (objects).
We will still be providing almost all the data available in v1 in GraphQL.

for eg:
v1 provides different endpoints like /origin/, /origin/intrinsic-metadata/, /origin/metadata-search/, /origin/visits/ etc.
With GraphQL, it will be a single Origin object. Metadata or origin visits will be paginated lists under this object.
Any client using these v1 endpoints will have to re-design their implementation to use these apis. Hope this makes sense.