graphql-hive icon indicating copy to clipboard operation
graphql-hive copied to clipboard

Preview states of registry

Open kamilkisiela opened this issue 2 years ago • 6 comments

A temporary state (a preview) with TTL of 14 days or something to fetch the schemas and supergraph from. Something that is purely about the registry (CDN part) without schema checks and observability stuff.

kamilkisiela avatar Jun 14 '23 14:06 kamilkisiela

dumping some information from the internal chat:

so from the information we have, it feels like either a flagged publish

hive schema:publish --preview

or a new type of command

hive schema:preview

In terms of the CDN, we could use the x-amz-expiration header which is also supported by r2, for automatically deleting the resources after some time.

n1ru4l avatar Jun 15 '23 07:06 n1ru4l

Tuning in here to add some points from the chat with @kamilkisiela:

  • there should be a way to tag the previews with either a revision or some other name so the preview environment can be configured to use the correct preview / the preview is automatically assigned to the correct preview environment by tag
  • multiple previews for different schema changes should be possible at the same time

for the use case I have in mind, a flagged publish would work just fine

erikwrede avatar Jun 16 '23 14:06 erikwrede

Ability to publish schema multiple times to the same preview (based on id?)

kamilkisiela avatar Jun 21 '23 16:06 kamilkisiela

Is this intended for something like previewing the schema of PRs?

yukukotani avatar Sep 15 '23 05:09 yukukotani

Is this intended for something like previewing the schema of PRs?

Yes, this way you can get the complete artifact from the CDN, without performing the publish action and effect the registry.

dotansimha avatar Sep 17 '23 02:09 dotansimha

For me, the use case is explained in #4089 , I'd like to create CI automation which will run type-check with PR-based schema changes in front-end code.

comatory avatar May 10 '24 06:05 comatory

Hi!

Any updates on this issue? We have a similar use case as @comatory, where we are looking to enhance our CI pipeline. The purpose is to verify that schema changes proposed in a merge/pull request are compatible with our frontend code.

Ideally something like the schema:fetch command that would support the action id (commit sha) that has been used in a schema:check.

jenskm avatar Nov 11 '24 10:11 jenskm