<commit_before>'use strict';

var fs = require('fs');

var ReactApollo = require('react-apollo');

var common = require('./lib/common');
var fragmentsFile = require('./lib/util').getFragmentsFile();

exports.Context = exports.createContext = common.Context.extend({
  prepareEnhancedElement: function (enhancedComponent) {
    return ReactApollo.getDataFromTree(enhancedComponent);
  },
  createClient: function (options) {
    options.ssrMode = true;
    return common.Context.prototype.createClient.call(this, options);
  },
  getIntrospectionResult: function () {
    if (fs.existsSync(fragmentsFile)) {<commit_msg>refactor(graphql): rename prepareEnhancedElement method to prepareRender<commit_after>'use strict';

var fs = require('fs');

var ReactApollo = require('react-apollo');

var common = require('./lib/common');
var fragmentsFile = require('./lib/util').getFragmentsFile();

exports.Context = exports.createContext = common.Context.extend({
  prepareRender: function (enhancedElement) {
    return ReactApollo.getDataFromTree(enhancedElement);
  },
  createClient: function (options) {
    options.ssrMode = true;
    return common.Context.prototype.createClient.call(this, options);
  },
  getIntrospectionResult: function () {
    if (fs.existsSync(fragmentsFile)) {
{'fraction_non_alphanumeric': 0.13494539781591264, 'fraction_numerical': 0.0, 'mean_word_length': 5.47979797979798, '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': '1518008', 'n_tokens_mistral': 374, 'n_tokens_neox': 366, 'n_words': 73}