You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to access the top-level query's arguments (and other stuff) from child object resolvers. This was my attempt to pass them down through p.Info.RootValue. However, the request body is always empty. The content length however says otherwise.
The issue arises because the r.Body stream is consumed earlier in the request lifecycle by the func NewRequestOptions(r *http.Request) *RequestOptions and is not restored. This means when you try to read it in RootObjectFn, it's already empty. The ContentLength is a header reflects the size of the body that was read and not restored.
i think you can use Source for parent information in child: params graphql.ResolveParams and access it like params.Source
I am trying to access the top-level query's arguments (and other stuff) from child object resolvers. This was my attempt to pass them down through
p.Info.RootValue
. However, the request body is always empty. The content length however says otherwise.The query itself always have a successful response:
The text was updated successfully, but these errors were encountered: