sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Used to print values in error messages.
     */
Used to print values in error messages.
Used to print values in error messages .
function inspect(value) {
      switch (_typeof$1(value)) {
        case 'string':
          return JSON.stringify(value);
        case 'function':
          return value.name ? "[function ".concat(value.name, "]") : '[function]';
        case 'object':
          if (value) {
            var customInspectFn = getCustomFn(value);
            if (customInspectFn) {
              var customValue = customInspectFn.call(value);
              return typeof customValue === 'string' ? customValue : inspect(customValue);
            } else if (Array.isArray(value)) {
              return '[' + value.map(inspect).join(', ') + ']';
            }
            var properties = Object.keys(value).map(function (k) {
              return "".concat(k, ": ").concat(inspect(value[k]));
            }).join(', ');
            return properties ? '{ ' + properties + ' }' : '{}';
          }
          return String(value);
        default:
          return String(value);
      }
    }
function inspect ( value ) { switch ( _typeof$1 ( value ) ) { case 'string' : return JSON . stringify ( value ) ; case 'function' : return value . name ? "[function " . concat ( value . name , "]" ) : '[function]' ; case 'object' : if ( value ) { var customInspectFn = getCustomFn ( value ) ; if ( customInspectFn ) { var customValue = customInspectFn . call ( value ) ; return typeof customValue === 'string' ? customValue : inspect ( customValue ) ; } else if ( Array . isArray ( value ) ) { return '[' + value . map ( inspect ) . join ( ', ' ) + ']' ; } var properties = Object . keys ( value ) . map ( function ( k ) { return "" . concat ( k , ": " ) . concat ( inspect ( value [ k ] ) ) ; } ) . join ( ', ' ) ; return properties ? '{ ' + properties + ' }' : '{}' ; } return String ( value ) ; default : return String ( value ) ; } }
Used to print values in error messages.
Used to print values in error messages .
// $FlowFixMe(>=0.90.0)