View index.ts
import { from, ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'; | |
import { errorLink } from './error.link'; | |
import * as tags from './posts.resolvers'; | |
const typeDefs = [tags.typeDefs]; | |
const resolvers = [tags.resolvers]; | |
const gqlClient = new ApolloClient({ | |
cache: new InMemoryCache(), | |
typeDefs, |
View MutationUtils.js
// @flow | |
import { ConnectionHandler } from 'relay-runtime'; | |
import { isObject, isArray } from 'lodash/fp'; | |
export function listRecordRemoveUpdater({ parentId, itemId, parentFieldName, store }) { | |
const parentProxy = store.get(parentId); | |
const items = parentProxy.getLinkedRecords(parentFieldName); | |
parentProxy.setLinkedRecords(items.filter(record => record._dataID !== itemId), parentFieldName); | |
} |
View App.js
import React from 'react' | |
import 'fontfaceobserver' | |
import IndexPage from './IndexPage' | |
import Loader from './Loader' | |
import { fetchUser } from '../apiclient' | |
import 'font-awesome-webpack' | |
import './Lato-font.css' | |
import './Roboto-font.css' |
View Container.js
import React from 'react'; | |
import { container } from 'redux-relay'; | |
@container({ | |
variablesFromState: (state) => ({myVariable: state.myState}) | |
fragments: { | |
Relay.QL` | |
viewer { |
View ru_en_analyzer
{ | |
"settings": { | |
"analysis": { | |
"filter": { | |
"english_stop": { | |
"type": "stop", | |
"stopwords": "_english_" | |
}, | |
"english_stemmer": { | |
"type": "stemmer", |