Eclipsis in Data Action failing

I have a data action with the below request, which is a graphql query. This works perfectly fine in Postman. Other requests without the inline fragmentation (the ... bit) work just fine as well.

payload:

#set ($d = $esc.dollar )
{
    "variables": {
        "accessNumber": ${input.accessNumber}
    },
    "query": "query Query($(d)accessNumber: Int!) { party(accessNumber: $(d)accessNumber) { ... on Person { firstName } }}"
}

Response template:
image

The error response I get is not helpful.

Response
{
  "message": "The request could not be understood by the server due to malformed syntax.",
  "code": "bad.request",
  "status": 400,
  "messageParams": {},
  "contextId": "6b3a1aef-cdd8-480a-a516-65589e7b1b03",
  "details": [
    {
      "errorCode": "ACTION.REMOTE_ENDPOINT"
    }
  ],
  "errors": [
    {
      "message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: {\"errors\":[{\"message\":\"parsing error: syntax error: expected a Name\",\"locations\":[{\"line\":1,\"column\":14}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a Name\",\"locations\":[{\"line\":1,\"column\":14}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected R_PAREN, got (\",\"locations\":[{\"line\":1,\"column\":14}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a Selection Set\",\"locations\":[{\"line\":1,\"column\":14}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected definition\",\"locations\":[{\"line\":1,\"column\":15}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":16}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected definition\",\"locations\":[{\"line\":1,\"column\":17}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":29}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected definition\",\"locations\":[{\"line\":1,\"column\":31}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":34}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":35}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a Name\",\"locations\":[{\"line\":1,\"column\":60}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected R_PAREN, got (\",\"locations\":[{\"line\":1,\"column\":60}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected R_CURLY, got (\",\"locations\":[{\"line\":1,\"column\":60}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":60}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected definition\",\"locations\":[{\"line\":1,\"column\":61}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":62}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected definition\",\"locations\":[{\"line\":1,\"column\":63}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":75}],\"extensions\":{\"code\":\"PARSING_ERROR\"}},{\"message\":\"parsing error: syntax error: expected a StringValue, Name or OperationDefinition\",\"locations\":[{\"line\":1,\"column\":108}],\"extensions\":{\"code\":\"PARSING_ERROR\"}}]} [6b3a1aef-cdd8-480a-a516-65589e7b1b03]",
      "code": "BAD_REQUEST",
      "status": 400,
      "messageParams": {},
      "details": [],
      "errors": []
    }
  ]
}

So just looking at how to escape the eclipisis (...) in the string to work as intended.

Think there was just some white spaces where there shouldn't have been.
this works
"query": "query Party(${d}accessNumber: Int!) {party(accessNumber: ${d}accessNumber) { ... on Person{displayName gender}}}"

d{}
not d()

sigh there goes way to much time figuring that out

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.