Closed bsr203 closed 8 years ago
Hi @bsr203, thanks for bring this up, I think we should make available Context
through Info.Context
, meaning a change on graphql-go
is required. I think we are just fine moving it to it since it is meant for that purpose.
The resolve function's optional third argument is a collection of information about the current execution state. https://github.com/graphql-go/graphql/blob/master/executor.go#L492-L493
Also as you mentioned above, other good solution would be to pass Context
directly to MutationFn
, I will submit a PR for that :+1:
thanks Chris for quick response and the fix. greatly appreciate all your hard work.
closing this one, resolved with #15 :+1:
In graphql,
Context
is passed throughResolveParams
. https://github.com/graphql-go/graphql/commit/14c8c6d488e09446c6217b811b266a663ffc8accThis is not available in
relay
API. the resolve function for mutation has following signature.type MutationFn func(inputMap map[string]interface{}, info graphql.ResolveInfo) map[string]interface{}
can we pass
ResolveParams
orContext
directly?thanks.