@things-factory/shell 6.0.21 → 6.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "6.0.21",
3
+ "version": "6.0.24",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -33,6 +33,9 @@
33
33
  "@apollo/client": "^3.6.9",
34
34
  "@apollo/server": "^4.5.0",
35
35
  "@as-integrations/koa": "^0.3.0",
36
+ "@graphql-codegen/cli": "^3.2.2",
37
+ "@graphql-codegen/typescript": "^3.0.2",
38
+ "@graphql-codegen/typescript-resolvers": "^3.1.1",
36
39
  "@graphql-tools/merge": "^8.3.0",
37
40
  "@graphql-tools/schema": "^8.5.0",
38
41
  "@graphql-tools/utils": "^8.8.0",
@@ -115,7 +118,7 @@
115
118
  "sass": "^1.50.1",
116
119
  "scrollbooster": "^3.0.2",
117
120
  "sweetalert2": "^10.9.0",
118
- "type-graphql": "npm:type-graphql-v2-fork@2.0.0-alpha2",
121
+ "type-graphql": "^2.0.0-beta.1",
119
122
  "typeorm": "^0.3.9",
120
123
  "uuid": "^3.4.0",
121
124
  "web-animations-js": "^2.3.2",
@@ -131,5 +134,5 @@
131
134
  "pg": "^8.7.3",
132
135
  "sqlite3": "^5.0.8"
133
136
  },
134
- "gitHead": "074a4f460d08fed4bc7e9882aa57f4c120cf0f11"
137
+ "gitHead": "27c1a4c3bcf4f293e7e676caa1f2daa3bb6ded11"
135
138
  }
package/server/schema.ts CHANGED
@@ -6,6 +6,8 @@ import { mergeSchemas } from '@graphql-tools/schema'
6
6
  import { loader, orderedModuleNames } from '@things-factory/env'
7
7
  import { deepMerge } from '@things-factory/utils'
8
8
 
9
+ const path = require('path')
10
+
9
11
  export async function schema() {
10
12
  const schemas = orderedModuleNames
11
13
  .map(dep => loader(dep).schema)
@@ -142,7 +144,12 @@ export async function schema() {
142
144
  schemas: [
143
145
  await buildSchema({
144
146
  resolvers: schemas.resolverClasses,
145
- dateScalarMode: 'timestamp'
147
+ dateScalarMode: 'timestamp',
148
+ // automatically create `schema.gql` file with schema definition
149
+ // in project's working directory
150
+ // or create the file with schema in selected path
151
+ emitSchemaFile: process.env.NODE_ENV == 'development'
152
+ // emitSchemaFile: path.resolve(__dirname, 'snapshots/schema', 'schema.gql')
146
153
  })
147
154
  ],
148
155
  typeDefs,