Getting "Parsing failed" Error for all NRQL queries while posting via HttpURLConnection in Java program

165 Views Asked by At

I have written a Java Program to connect to NewRelic Graphql API end point https://api.newrelic.com/graphql and successfully able to connect.

  • However getting parsing error for the NRQL query.

    Query is {"query": "SELECT average(duration) FROM Transaction 
    WHERE appName = 'My_Application'"}
    Response Code: 200
    Response Body:
    {"errors":[{"locations":
    [{"column":59,"line":1}],"message":"Parsing failed at `'My_Applic`"}]}
    

I am expecting the output, but getting parsing error

0

There are 0 best solutions below