Skip to content

Commit

Permalink
Merge pull request #654 from akto-api-security/feature/ab_6
Browse files Browse the repository at this point in the history
Feature/ab 6
  • Loading branch information
ankush-jain-akto authored Mar 8, 2023
2 parents 6b001c8 + 6045aff commit 5066c5f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libs/utils/src/main/java/com/akto/graphql/GraphQLUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ private void updateResponseParamList(HttpResponseParams responseParams, List<Htt
for (Selection selection : selectionList) {
if (selection instanceof Field) {
Field field = (Field) selection;
String graphqlPath = path + "/" + operation.name().toLowerCase() + "/" + field.getName();
String defName = definition.getName() == null ? "" : ( "/" + definition.getName());

String graphqlPath = path.split("\\?")[0] + "/" + operation.name().toLowerCase() + defName + "/"+ field.getName();

if (path.contains("?")) {
graphqlPath += ("?"+path.split("\\?")[1]);
}

HttpResponseParams httpResponseParamsCopy = responseParams.copy();
httpResponseParamsCopy.requestParams.setUrl(graphqlPath);
try {
Expand Down

0 comments on commit 5066c5f

Please sign in to comment.