Open chirino opened 3 years ago
@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?
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.