Remove unused codegen stuff and update Hasura to latest version (#314)

This commit is contained in:
Hammad Jutt
2021-01-29 13:02:33 -07:00
committed by GitHub
parent 15d6ef06bc
commit b20c1fea27
8 changed files with 12 additions and 272 deletions

View File

@@ -1,8 +0,0 @@
import gql from 'graphql-tag';
export const Player = gql`
fragment Player on player {
id
total_xp
}
`;

View File

@@ -1,23 +0,0 @@
schema:
- ./schema.graphql
documents:
overwrite: true
config:
scalars:
DateTime: Date
JSON: '{ [key: string]: any }'
generates:
./autogen/hasura/gql.ts:
plugins:
- graphql-codegen-hasura-gql
documents:
- ./customFragments.ts
config:
reactApolloVersion: 3
typescriptCodegenOutputPath: ../
trimString:
withQueries: true
withSubscriptions: true
withInserts: true
withUpdates: true
withDeletes: true

View File

@@ -1,66 +0,0 @@
schema:
- ./schema.graphql
overwrite: true
config:
scalars:
DateTime: Date
JSON: '{ [key: string]: any }'
generates:
./autogen/index.tsx:
documents:
- ./**/*.tsx
- ./**/*.ts
plugins:
- typescript
- typescript-operations
- typescript-react-apollo
config:
reactApolloVersion: 3
withHooks: false
withHOC: false
withComponent: false
skipTypename: false
includeDirectives: true
./autogen/hasura/ts.ts:
documents:
- ./customFragments.ts
plugins:
- graphql-codegen-hasura-typescript
config:
reactApolloVersion: 3
typescriptCodegenOutputPath: '../'
trimString:
withClientAndCacheHelpers: true
withQueries: true
withSubscriptions: true
withInserts: true
withUpdates: true
withDeletes: true
./autogen/hasura/react.ts:
documents:
- ./customFragments.ts
plugins:
- graphql-codegen-hasura-react
config:
reactApolloVersion: 3
typescriptCodegenOutputPath: '../'
trimString:
withQueries: true
withSubscriptions: true
withInserts: true
withUpdates: true
withDeletes: true
./autogen/hasura/config.ts:
documents:
- ./customFragments.ts
plugins:
- graphql-codegen-hasura-client-config
config:
reactApolloVersion: 3
typescriptCodegenOutputPath: '../'
trimString:
withTypePolicies: true
withResolverTypes: true
withCombinedTypePolicyObject: false
withCacheRedirects: true
withCombinedCacheRedirectObject: true

View File

@@ -6,21 +6,13 @@
"node": ">=12.x.x"
},
"scripts": {
"get-schema": "env-cmd -f ../../.env -x get-graphql-schema -h x-hasura-admin-secret=\\$HASURA_GRAPHQL_ADMIN_SECRET http://localhost:8080/v1/graphql > schema.graphql",
"update-schema": "yarn get-schema && yarn generate",
"generate": "graphql-codegen --config=graphql-codegen-gql.yaml && graphql-codegen --config=graphql-codegen-typescript.yaml"
"update-schema": "env-cmd -f ../../.env -x get-graphql-schema -h x-hasura-admin-secret=\\$HASURA_GRAPHQL_ADMIN_SECRET http://localhost:8080/v1/graphql > schema.graphql"
},
"dependencies": {
"graphql-tag": "^2.10.4"
},
"devDependencies": {
"env-cmd": "^10.1.0",
"get-graphql-schema": "^2.1.2",
"graphql-codegen-hasura-client-config": "^4.8.3",
"graphql-codegen-hasura-core": "^4.8.3",
"graphql-codegen-hasura-gql": "^4.8.3",
"graphql-codegen-hasura-react": "^4.8.3",
"graphql-codegen-hasura-shared": "^4.8.3",
"graphql-codegen-hasura-typescript": "^4.8.3"
"get-graphql-schema": "^2.1.2"
}
}