I am trying to save values to be used for later. I checked if the jsonpath I am using is returning the values I want on https://jsonpath.com/ website. I use the same logic for saving another set of data and that works. I don’t know what’s the problem. Could you please help?
Here is the request I use to save “bookingIds”
def getBookingIds = exec(
http(getGraphQLName(........json"))
.post("/graphql")
.headers(graphqlHeader)
.body(
RawFileBody("xxxxxx.json")
)
.check(noGraphQLErrors)
.check(
jsonPath("$.data.currentUser.bookings.*.id").findAll
.saveAs("bookingIds")
)
)
Here is the json data sample:
{
"data": {
"currentUser": {
"id": "....",
"bookings": [
{
"__typename": "SeatOpenBooking",
"id": "20377"
}
]
}
}
}
Here is the error I am getting:
---- Errors --------------------------------------------------------------------
> jsonPath($.data.currentUser.bookings.*.id).findAll.exists, fou 1 (100.0%)
nd nothing
================================================================================