refactor(ott-67): removed gql config

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
mirlan.maksitaliev 6 years ago
parent 7cf59ea39c
commit 9e7e96b2a2
  1. 4
      .eslintignore
  2. 22
      codegen.yml
  3. 2
      commitlint.config.js
  4. 12
      package.json
  5. 8
      src/api/operations/User/queries.graphql
  6. 3
      src/api/operations/User/queries.tsx
  7. 2
      src/config/routes.tsx
  8. 11
      src/index.tsx
  9. 1
      src/react-app-env.d.ts
  10. 0
      src/requests/index.tsx
  11. 0
      src/requests/login.tsx
  12. 1
      src/serviceWorker.ts
  13. 3
      src/types/index.tsx

@ -1,4 +0,0 @@
src/types/*
src/api/operations/**/*.tsx
src/react-app-env.d.ts
src/serviceWorker.ts

@ -1,22 +0,0 @@
overwrite: true
schema: ''
documents: src/api/operations/**/*.graphql
generates:
src/types/index.tsx:
plugins:
- typescript
src/:
preset:
near-operation-file
presetConfig:
extension: .tsx
baseTypesPath: types
plugins:
- typescript-operations
- typescript-react-apollo
config:
withComponent: false
withHOC: false
withHooks: true
config:
typesPrefix: T

@ -2,7 +2,7 @@ const Configuration = {
extends: ['@commitlint/config-conventional'],
/** Any rules defined here will override rules from
* @commitlint/config-conventional **/
* @commitlint/config-conventional */
rules: {
'body-max-length': [2, 'always', 120],
'body-min-length': [2, 'always', 3],

@ -3,22 +3,16 @@
"version": "0.1.0",
"private": true,
"scripts": {
"prestart ": "yarn generate",
"start": "react-scripts start",
"build": "GENERATE_SOURCEMAP=false react-scripts build && gzipper --verbose ./build",
"test": "react-scripts test --testMatch '**/__tests__/*' --passWithNoTests --watchAll=false",
"test:watch": "react-scripts test --testMatch '**/__tests__/*'",
"eject": "react-scripts eject",
"generate": "graphql-codegen --config codegen.yml",
"lint": "eslint 'src/**/*.{ts,tsx}'",
"storybook": "start-storybook -p 9009 -s public",
"build-storybook": "build-storybook -s public"
},
"dependencies": {
"@apollo/react-common": "^3.1.4",
"@apollo/react-hooks": "^3.1.5",
"apollo-boost": "^0.4.9",
"graphql": "^15.0.0",
"lodash": "^4.17.15",
"react": "^16.13.1",
"react-dom": "^16.13.1",
@ -27,12 +21,6 @@
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@graphql-codegen/cli": "1.15.0",
"@graphql-codegen/import-types-preset": "^1.15.0",
"@graphql-codegen/near-operation-file-preset": "^1.15.0",
"@graphql-codegen/typescript": "1.15.0",
"@graphql-codegen/typescript-operations": "1.15.0",
"@graphql-codegen/typescript-react-apollo": "1.15.0",
"@storybook/addon-actions": "^5.3.19",
"@storybook/addon-docs": "^5.3.19",
"@storybook/addon-links": "^5.3.19",

@ -1,8 +0,0 @@
query User {
__schema {
types {
name
kind
}
}
}

@ -1,3 +0,0 @@
// autgenerated using https://graphql-code-generator.com/
export {}

@ -1,2 +1,2 @@
export const API_ROOT = ''
export const GRAPHQL = `${API_ROOT}/graphql`
export const DATA_URL = `${API_ROOT}/data`

@ -1,22 +1,13 @@
import React from 'react'
import ReactDOM from 'react-dom'
import ApolloClient from 'apollo-boost'
import { ApolloProvider } from '@apollo/react-hooks'
import { GRAPHQL } from 'config'
import { App } from 'features/App'
import * as serviceWorker from './serviceWorker'
const client = new ApolloClient({
uri: GRAPHQL,
})
ReactDOM.render(
<React.StrictMode>
<ApolloProvider client={client}>
<App />
</ApolloProvider>
<App />
</React.StrictMode>,
document.getElementById('root'),
)

@ -1 +1,2 @@
// eslint-disable-next-line spaced-comment
/// <reference types="react-scripts" />

@ -1,3 +1,4 @@
/* eslint-disable */
// This optional code is used to register a service worker.
// register() is not called by default.

@ -1,3 +0,0 @@
// autgenerated using https://graphql-code-generator.com/
export {}
Loading…
Cancel
Save