<commit_before>console.log('hey')

var form = document.querySelector('form')
var input = document.querySelector('input')

form.onsubmit = function submitUrl(event) {
    event.preventDefault()
    var xhr = new XMLHttpRequest()
    xhr.responseType = 'json'
    xhr.open("POST", "/graphql")
    xhr.setRequestHeader("Content-Type", "application/json")
    xhr.setRequestHeader("Accept", "application/json")
    xhr.onload = function () {
        console.log('data returned:', xhr.response)
    }
    xhr.send(JSON.stringify({query: "{ sessionId }"}))
}<commit_msg>Play around with client some more<commit_after>console.log('hey')

var form = document.querySelector('form')
var input = document.querySelector('input')

form.onsubmit = function submitUrl(event) {
    event.preventDefault()
    console.log(input.value)
    var xhr = new XMLHttpRequest()
    xhr.responseType = 'json'
    xhr.open("POST", "/graphql")
    xhr.setRequestHeader("Content-Type", "application/json")
    xhr.setRequestHeader("Accept", "application/json")
    xhr.onload = function () {
        if (xhr.response.data.addRepo.message != null) {
            console.log(xhr.response.data.addRepo.message)
        } else {
            console.log(xhr.response.data.addRepo)
        }
    }
    var query = `
        mutation ($url: String!) {
          addRepo(url: $url) {
            ... on Repo {
              status
            }
            ... on UserError {
              message
            }
          }
        }
    `
    xhr.send(JSON.stringify({query: query, variables: {url:input.value}}))
}
{'fraction_non_alphanumeric': 0.14629512349588347, 'fraction_numerical': 0.0, 'mean_word_length': 2.6155606407322654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2307175', 'n_tokens_mistral': 482, 'n_tokens_neox': 488, 'n_words': 84}