hasura / hasura/graphql-engine

APi to retrieve metadata version of instance

Open
#10,059 2 comments 0 reactions 0 assignees View on GitHub
k/enhancement t/gql-services v2
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

We're running heavy graphql codegen for our applications, the growth of our graph increase codegen workload significantly over time.

### Describe the solution you'd like

An API or a way to detect if the graph/metadata has changed so codegen will only create types or downloading schema when there are changes. I believe internally Hasura has that inside

### Describe alternatives you've considered

At the moment we hack to enable this data: add hasura metadata db itself into hasura, set a native query:

```sql
SELECT resource_version FROM hdb_catalog.hdb_metadata;
```

then run this graphql query:

```gql
{ hdb_catalog { metadata_version { resource_version } }}
```

Contributor guide

Open the contributing guide

Research direction

Start by examining the existing metadata_version GraphQL query and the hdb_catalog.hdb_metadata resource_version value described in the issue. Determine how an API can expose metadata changes without requiring schema downloads, then verify that code generation can use the returned version to skip unchanged schemas.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgres
Domain
api, backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.