Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with wrong Action[Ctx, _] conversion being summoned #1169

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Jan 14, 2025

The actual change that fixes the issue is very simple, instead of summoning [fieldType => Action[Ctx, fieldType]] we summon [fieldType => Action[Ctx, _]], so that we can also summon ReduceAcrion.futureAction and tryAction (previously we mistakenly limited ourselves to defaultAction).

I also allowed myself to simplify the code a bit, wrapping all of the faux-implicit conversions into a separate method, for readability.

Based on the minimization and research done in #1168 (I moved the test into the DeriveObjectTypeMacroSuite)

Fixes #906

@jchyb jchyb force-pushed the fix-issue-906 branch 3 times, most recently from a5215d6 to d6c967c Compare January 14, 2025 12:41
Copy link
Contributor

@yanns yanns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! 💯

@yanns yanns added this pull request to the merge queue Jan 14, 2025
Merged via the queue into sangria-graphql:main with commit da8bb1e Jan 14, 2025
4 checks passed
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.

Scala 3: Exception returning Future values from GraphQL Endpoint
2 participants