Skip to content

retrieve CDN artifacts by version #7222

@n1ru4l

Description

@n1ru4l

Today we always only serve the latest schema version artifacts from the CDN from the following URL:

https://cdn.graphql-hive.com/artifacts/v1/<target-id>/supergraph
https://cdn.graphql-hive.com/artifacts/v1/<target-id>/sdl
https://cdn.graphql-hive.com/artifacts/v1/<target-id>/services

This is fine and should always point to the latest version.

In addition we should, also allow to lookup schema versions by their ID.

https://cdn.graphql-hive.com/artifacts/v1/<target-id>/version/<version-id>/supergraph
https://cdn.graphql-hive.com/artifacts/v1/<target-id>/version/<version-id>/sdl
https://cdn.graphql-hive.com/artifacts/v1/<target-id>/version/<version-id>/services

We don't need to make this backwards compatible with already existing schema versions, but can start doing it for new schema versions.

The technical implementation can simply just write the artifacts to that key on the S3 bucket during schema publish, and the CDN handler can be adjusted to support looking up these.

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions