We can write the query resolver layer as below
@DgsData(parentType = "Query", field = "answersByQuestionUuid")
public List<Answer> answersByQuestionUuid(@InputArgument("questionUuid") UUID questionUuid,
@InputArgument("enhancedContent") boolean enhancedContent,
@InputArgument("templateName") String templateName) {
if (enhancedContent) {
return getStructuredAnswersByQuestionUUID(questionUuid.toString(), templateName);
}
return getAnswersByQuestionUUID(questionUuid);
}
How I can get the HTTP header in the resolver.