Skip to content

Rework input parsing in MethodFieldResolver to handle scalars within input objects - #471

Closed
oryan-block wants to merge 3 commits into
masterfrom
bugfix/466
Closed

oryan-block wants to merge 3 commits into
masterfrom
bugfix/466

Conversation

@oryan-block

Copy link
Copy Markdown
Collaborator

Fixes #466

Checklist

  • Pull requests follows the contribution guide
  • New or modified functionality is covered by tests

Description

Since there is no way for Jackson to know how to handle custom scalar types I have chosen to re-implement the input parsing manually. While this means we can't rely on Jackson to parse simple POJOs for us it also means we have more control over what's going on and we can handle the hard parts directly.
What this is doing is recursively building the java type from the given input value according to the graphql schema.

Comment thread src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt
@oryan-block
oryan-block requested a review from vojtapol January 5, 2021 15:37

@vojtapol vojtapol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While this solves the issue getting rid of Jackson completely might be too big of a breaking change. I would recommend finding a specific workaround for the Upload scalar for now and then come back to this in the future.

@vojtapol
vojtapol marked this pull request as draft January 7, 2021 17:13
@oryan-block

Copy link
Copy Markdown
Collaborator Author

Closing for now since we have a workaround: #466 (comment)

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.

Scalars within input objects cannot be parsed in MethodFieldResolver

2 participants