nl_tokens: ** add missing query fields ( if any ) for custom queries ; we need id number title and bodyText to deliver sentiment
pl_tokens: function addRequiredQueryFields ( query ) { let stringCondensed = query . replace ( / \s+ / g , " " ) ; let starti = stringCondensed . indexOf ( 'node {' ) + 6 ; let endi = stringCondensed . indexOf ( '}' , starti ) ; let currentParams = ( stringCondensed . substring ( starti , endi ) ) . split ( " " ) ; const requiredParams = [ "id" , "number" , "title" , "bodyText" ] ; requiredParams . forEach ( function ( p ) { if ( ! currentParams . includes ( p ) ) { currentParams . push ( p ) } } ) ; currentParams = currentParams . <mask> ( " " ) ; return stringCondensed . substr ( 0 , starti ) + currentParams + stringCondensed . substr ( endi ) ; }