async function getGitHubData( req, url ) {

    let cacheKey = "", queryString = "";
    let reqString = await req.text();

    const client = new GraphQLClient( 'https://api.github.com/graphql', {
        headers: {
            'User-Agent': req.headers.get('User-Agent') || app.config.userAgent,
            'Authorization': req.headers.get('Authorization') || 'Bearer ' + app.config.userToken
        }
    });

    //only requests from gui are json; non-gui requests use graphql syntax
    if( url.pathname === '/standard' ) {
        let reqStringJSON = await JSON.parse( reqString );
        cacheKey = reqStringJSON.org + "-" + reqStringJSON.repo;
        queryString = reqStringJSON.query;
    } else {
        queryString = addRequiredQueryFields( reqString );
    }

    const { dataString, status } = await getIssues( queryString, client, cacheKey );

    return { data: dataString, status: status, contentType: "application/json" };
}