<commit_before>import React from 'react'
import {
  ApolloClient,
  createNetworkInterface,
  ApolloProvider,
} from 'react-apollo'
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'

import { BrowserRouter, Route } from 'react-router-dom'

import Page from './components/Page'
import Home from './pages/Home'
import User from './pages/User'
import Media from './pages/Media'

import playerReducer from './reducers/player.js'
import mediasReducer from './reducers/medias.js'

const networkInterface = createNetworkInterface({
  uri: 'http://localhost:3000/graphql',
  opts: {
    credentials: 'same-origin',
  },
})

const client = new ApolloClient({
  networkInterface,
  dataIdFromObject: r => r.id
})

const store = createStore(
  combineReducers({
    player: playerReducer,
    medias: mediasReducer,
    apollo: client.reducer()
  }),
  compose(
    applyMiddleware(client.middleware()),
    window.devToolsExtension ? window.devToolsExtension() : f => f
  )
)

const App = () => (
  <ApolloProvider client={client} store={store}>
    <BrowserRouter>
      <Page>
        <Route exact path='/' component={Home} />
        <Route exact path='/u/:user_id/:source(likes|dislikes)?' component={User} />
        <Route exact path='/m/:id' component={Media} />
      </Page>
    </BrowserRouter>
  </ApolloProvider>
)

export default App
<commit_msg>Correct graphql url<commit_after>import React from 'react'
import {
  ApolloClient,
  createNetworkInterface,
  ApolloProvider,
} from 'react-apollo'
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'

import { BrowserRouter, Route } from 'react-router-dom'

import Page from './components/Page'
import Home from './pages/Home'
import User from './pages/User'
import Media from './pages/Media'

import playerReducer from './reducers/player.js'
import mediasReducer from './reducers/medias.js'

const networkInterface = createNetworkInterface({
  uri: '/graphql',
  opts: {
    credentials: 'same-origin',
  },
})

const client = new ApolloClient({
  networkInterface,
  dataIdFromObject: r => r.id
})

const store = createStore(
  combineReducers({
    player: playerReducer,
    medias: mediasReducer,
    apollo: client.reducer()
  }),
  compose(
    applyMiddleware(client.middleware()),
    window.devToolsExtension ? window.devToolsExtension() : f => f
  )
)

const App = () => (
  <ApolloProvider client={client} store={store}>
    <BrowserRouter>
      <Page>
        <Route exact path='/' component={Home} />
        <Route exact path='/u/:user_id/:source(likes|dislikes)?' component={User} />
        <Route exact path='/m/:id' component={Media} />
      </Page>
    </BrowserRouter>
  </ApolloProvider>
)

export default App

{'fraction_non_alphanumeric': 0.13863553447646845, 'fraction_numerical': 0.001459321415541773, 'mean_word_length': 3.9051878354203935, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, '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': '4693841', 'n_tokens_mistral': 878, 'n_tokens_neox': 857, 'n_words': 208}