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

Modified error handling in UnmarshalString to marshal non-string input into a JSON string #3530

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rodneyosodo
Copy link

Describe your PR and link to any relevant issues.

This PR updates the UnmarshalString function to handle non-string inputs by marshaling them into JSON instead of immediately returning an error. This change ensures that generic scalars are handled more gracefully in scenarios where input types do not exactly match the expected string type.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@StevenACoffman
Copy link
Collaborator

Hi! I am curious about your use case, and why you wouldn't want to use the built-in scalar Any.

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.

2 participants