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
Currently , all of the request handling logic are implemented in the getHandler and postHandler , but all of its internal methods are private methods which make the subclass cannot customise the request handling logic by override the corresponding methods.
My use-case is that I would like to override the logic of setting the HttpServletResponse (e.g its status code , the content write to the outputStream)(i.e the following codes in query() )
if (!(result.getData() instanceof Publisher)) {
resp.setContentType(APPLICATION_JSON_UTF8);
resp.setStatus(STATUS_OK);
resp.getWriter().write(graphQLObjectMapper.serializeResultAsJson(result));
}
I am thinking perhaps to refactor the logic of getHandler/postHandler into many sensible protected methods such that subclass can override it
(e.g queryIntroSpectionRequest() , setResponse() .....)
The text was updated successfully, but these errors were encountered:
The refactoring that needs to be done is a lot more extensive. The AbtractGraphQLHttpServlet has way too much responsibilities at the moment. Make sure you keep an eye on the PR for #182 once that work is being done to see if it suits your needs too.
Maybe related to #182 .
Currently , all of the request handling logic are implemented in the getHandler and postHandler , but all of its internal methods are private methods which make the subclass cannot customise the request handling logic by override the corresponding methods.
My use-case is that I would like to override the logic of setting the
HttpServletResponse
(e.g its status code , the content write to the outputStream)(i.e the following codes in query() )I am thinking perhaps to refactor the logic of getHandler/postHandler into many sensible protected methods such that subclass can override it
(e.g
queryIntroSpectionRequest()
,setResponse()
.....)The text was updated successfully, but these errors were encountered: