<commit_before>import {
  graphql,
  GraphQLSchema,
  GraphQLObjectType,
  GraphQLString
} from 'graphql';

import getSchemaFromFilename from '../libs/getSchemaFromFilename';

var schema = new GraphQLSchema({
  query: new GraphQLObjectType({
    name: 'RootQueryType',
    fields: {
      hello: {
        type: GraphQLString,
        resolve() {
          return 'world';
        }
      }
    }
  })
});

/**
 * GET /
 * Home page.
 */
export function index(req, res) {
  let {
    file,
    query
  } = req.query;
  let data = getSchemaFromFilename(file);
  data.then((d) => {
    console.log(d);
  })
  graphql(schema, query).then(result => {
    res.send(result);
  });
};<commit_msg>plugging shit together<commit_after>import {
  graphql,
  GraphQLSchema,
  GraphQLObjectType,
  GraphQLString
} from 'graphql';

import {parseFile} from '../libs/parsing';
import {schemaFromSpreadSheet} from '../libs/genSchema';

const FILE = './fixtures/TestTables.ods';
const data = parseFile(FILE);
const schema = schemaFromSpreadSheet("test", data);

/**
 * GET /
 * Home page.
 */
export function index(req, res) {
  let { query } = req.query;
  graphql(schema, query).then(result => {
    res.send(result);
  });
};
{'fraction_non_alphanumeric': 0.15206611570247933, 'fraction_numerical': 0.0, 'mean_word_length': 3.1331058020477816, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5179302', 'n_tokens_mistral': 409, 'n_tokens_neox': 403, 'n_words': 86}