hasura / hasura/graphql-engine

Enum with the same name doesn't get merged

Open
#8,514 0 comments 1 reaction 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

Server Version: v2.6.1-cloud.1

CLI Version (for CLI related issue): latest

### Environment

Cloud

### What is the expected behaviour?

I'd expect Hasura to merge enum types from two remote schemas that have the same name but slightly different variants/fields.

### Keywords

remote-schema, enum, merge, fields, variants

### What is the current behaviour?

The remote schema's enum variants/values are slightly different so the current Hasura behviour only picks on of the enum.

### How to reproduce the issue?

1. Have two remote schemas that contains a enum type with the same name but slightly different variants/fields
2. Add the two remote schemas to Hasura
3. The resulting merged schema only picks one of the enum types (therefore missing/omitting the other enum variants)

### Any possible solutions?

Merge all enum variants/fields across remotes schemas that have the same name.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with two remote schemas that define the same enum with different variants, following the three steps in the report. Then locate the remote-schema schema-merging logic and related tests. Done means the merged schema includes the enum variants from both remotes without omitting either set.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Bug
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.