graphql-hive / graphql-hive/console

show metadata for schema change approvals from pull requests in history

Open
#3,404 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
483
Forks
145
Avg merge
2d 5h
Merged PRs (30d)
65

Description

Currently, the history (schema version) schema changes and schema check schema changes are completely separate and have no relation to each other.

Starting with [https://github.com/kamilkisiela/graphql-hive/pull/3359](), we store approval metadata on the approved schema changes within a pull request. The `schema_change_approval` table contains these changes that have been approved.

![image](https://uploads.linear.app/d27962ec-fde7-415f-a81c-8d2bc5a7ff94/bb0e7f26-169a-45d2-ad0e-6416165c4d26/4544261c-0cd6-4b6b-a2a0-86fa52a02cf3?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiL2QyNzk2MmVjLWZkZTctNDE1Zi1hODFjLThkMmJjNWE3ZmY5NC9iYjBlN2YyNi0xNjlhLTQ1ZDItYWQwZS02NDE2MTY1YzRkMjYvNDU0NDI2MWMtMGNkNi00YjZiLWEyYTAtODZmYTUyYTAyY2YzIiwiaWF0IjoxNzgwNDEzMjAxLCJleHAiOjE4MTE5ODM3NjF9.hcdCd4Ndbmbl4JNWV8TP3Liee690-8vjfGZGoqilwiw)

It would be cool if when a schema version is published, we also include the approval metadata within the changes that are linked to the schema version.

There is, however, one big issue:
We don't know whether a branch/pull request that contains approved schema changes has been merged into the branch from which publishes are run.
This could lead to false information, e.g. a schema change could have been introduced and approved within two separate branches. How do we know which approval made it into the branch from which the schema is published?

For GitHub, we could leverage the GitHub API to check which changes were introduced in which pull request ([GitHub Docs: List pull requests associated with a commit]())

For other providers, we would require manual actions from users.

For the first iteration, we could only ship this feature for GitHub.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.