function parseGraphQL (requestBody, trimFields) {
  let query = requestBody.graphql ? requestBody.graphql.query : '',
    graphqlVariables = requestBody.graphql ? requestBody.graphql.variables : '{}';
  try {
    graphqlVariables = JSON.parse(graphqlVariables || '{}');
  }
  catch (e) {
    graphqlVariables = {};
  }
  return 'request.AddParameter("application/json", ' +
          `"${sanitize(JSON.stringify({query: query || '', variables: graphqlVariables}), trimFields)}",
           ParameterType.RequestBody);\n`;

}
/**
 *
 * @param {Object} requestBody - JSON object representing body of request
 * @param {boolean} trimFields - Boolean denoting whether to trim body fields
 * @returns {String} code snippet for graphql body
 */
@param {Object} requestBody - JSON object representing body of request
@param {boolean} trimFields - Boolean denoting whether to trim body fields
@returns {String} code snippet for graphql body
@param { Object } requestBody - JSON object representing body of request @param { boolean } trimFields - Boolean denoting whether to trim body fields @returns { String } code snippet for graphql body
function parseGraphQL (requestBody, trimFields) {
  let query = requestBody.graphql ? requestBody.graphql.query : '',
    graphqlVariables = requestBody.graphql ? requestBody.graphql.variables : '{}';
  try {
    graphqlVariables = JSON.parse(graphqlVariables || '{}');
  }
  catch (e) {
    graphqlVariables = {};
  }
  return 'request.AddParameter("application/json", ' +
          `"${sanitize(JSON.stringify({query: query || '', variables: graphqlVariables}), trimFields)}",
           ParameterType.RequestBody);\n`;
}
function parseGraphQL ( requestBody , trimFields ) { let query = requestBody . graphql ? requestBody . graphql . query : '' , graphqlVariables = requestBody . graphql ? requestBody . graphql . variables : '{}' ; try { graphqlVariables = JSON . parse ( graphqlVariables || '{}' ) ; } catch ( e ) { graphqlVariables = { } ; } return 'request.AddParameter("application/json", ' + ` ${ sanitize ( JSON . stringify ( { query : query || '' , variables : graphqlVariables } ) , trimFields ) } \n ` ; }
@param {Object} requestBody - JSON object representing body of request
 @param {boolean} trimFields - Boolean denoting whether to trim body fields
 @returns {String} code snippet for graphql body
@param { Object } requestBody - JSON object representing body of request @param { boolean } trimFields - Boolean denoting whether to trim body fields @returns { String } code snippet for graphql body