Skip to content

Conversation

stuebingerb
Copy link
Owner

Previously, enums had to be manually added to a schema using enum<Class>(), e.g.

schema {
    enum<FilmType>()
    query("getEnum") {
        resolver { -> FilmType.FULL_LENGTH }
    }
}

This was a non-intuitive source of errors that especially new users were facing.

Now, enums are handled automatically, so the following definition is now valid:

schema {
    query("getEnum") {
        resolver { -> FilmType.FULL_LENGTH }
    }
}

Resolves #253

Previously, enums had to be manually added to a schema using
`enum<Class>()`, e.g.

```
schema {
    enum<FilmType>()
    query("getEnum") {
        resolver { -> FilmType.FULL_LENGTH }
    }
}
```

This was a non-intuitive source of errors that especially new users
were facing.

Now, enums are handled automatically, so the following definition is
now valid:

```
schema {
    query("getEnum") {
        resolver { -> FilmType.FULL_LENGTH }
    }
}
```

Resolves #253
@stuebingerb stuebingerb changed the title feature: handle enums automatically feat: handle enums automatically Oct 7, 2025
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.30%. Comparing base (e5df722) to head (1157499).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #408      +/-   ##
==========================================
+ Coverage   77.26%   77.30%   +0.03%     
==========================================
  Files         152      152              
  Lines        4865     4877      +12     
  Branches      843      845       +2     
==========================================
+ Hits         3759     3770      +11     
  Misses        788      788              
- Partials      318      319       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stuebingerb stuebingerb merged commit 3d138fc into main Oct 8, 2025
11 of 12 checks passed
@stuebingerb stuebingerb deleted the feature/auto-enums branch October 8, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically handle enums

2 participants