Adds default custom scalar of interface{} #686
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given that the Map default custom scalar is automatically provided of map[string]interface{}, it seemed strange to me that interface{} itself has no scalar. These seems like a common (albeit not optimal) enough design pattern in Go that it should be included. At first I thought it might push people not to strictly type their schema, but since Map is supported, I don't see any reason why this shouldn't be.
I didn't add and link an issue because of the simplicity of this PR
I have:
I can add tests if they are deemed necessary, but the other custom scalars don't have any, and this particular scalar is much simpler