fix: issue #65: type of ResolveInfo.RootValue should be interface{}
changes type of ResolveInfo.RootValue ot be interface{}
I would like to set the RootObject to a struct pointer that my resolvers would rather deal with.
Coverage increased (+0.4%) to 92.427% when pulling bca2f15dcfaf83b357832694e02d3ebd0551cc26 on chirino:issue-65 into f02a1c961028d3ba7ac6bb22eaa09b31a2cb53dd on graphql-go:master.
@chirino thanks for filing a PR — I don't think we should be changing this end-user type: graphql.Params.RootObject because it would be an API breaking-change.
An alternative strategy would be to have a small wrapper around your resolvers that consolidates map[string]interface{} to interface{} on your end ?
To avoid the breaking change we could Introduce a new field and deprecate RootValue and ask folks to stop using RootValue.
@chris-ramon what about this new version?
RootValue is part of the spec, I don't think deprecating it is a good idea.
That said, will changing it to interface{} actually break it? map[string]interface{} can be assigned to an interface value no?