@lenne.tech/nest-server 9.2.6 → 9.2.7

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": "@lenne.tech/nest-server",
3
- "version": "9.2.6",
3
+ "version": "9.2.7",
4
4
  "description": "Modern, fast, powerful Node.js web framework in TypeScript based on Nest with a GraphQL API and a connection to MongoDB (or other databases).",
5
5
  "keywords": [
6
6
  "node",
package/src/config.env.ts CHANGED
@@ -56,6 +56,7 @@ const config: { [env: string]: IServerOptions } = {
56
56
  },
57
57
  maxComplexity: 20,
58
58
  },
59
+ ignoreSelectionsForPopulate: true,
59
60
  jwt: {
60
61
  secret: 'SECRET_OR_PRIVATE_KEY_LOCAL',
61
62
  signInOptions: {
@@ -129,6 +130,7 @@ const config: { [env: string]: IServerOptions } = {
129
130
  },
130
131
  maxComplexity: 20,
131
132
  },
133
+ ignoreSelectionsForPopulate: true,
132
134
  jwt: {
133
135
  secret: 'SECRET_OR_PRIVATE_KEY_DEV',
134
136
  signInOptions: {
@@ -202,6 +204,7 @@ const config: { [env: string]: IServerOptions } = {
202
204
  },
203
205
  maxComplexity: 20,
204
206
  },
207
+ ignoreSelectionsForPopulate: true,
205
208
  jwt: {
206
209
  secret: 'SECRET_OR_PRIVATE_KEY_PROD',
207
210
  signInOptions: {
@@ -173,8 +173,11 @@ export interface IServerOptions {
173
173
  /**
174
174
  * Ignore selections in fieldSelection
175
175
  * [ConfigService must be integrated in ModuleService]
176
- * If falsy (default): select and populate information in fieldSelection will be respected
177
- * If truly: select fields will be ignored and only populate fields in fieldSelection will be respected
176
+ * If truly (default): select fields will be ignored and only populate fields in fieldSelection will be respected
177
+ * If falsy: select and populate information in fieldSelection will be respected
178
+ *
179
+ * Hint: falsy may cause problems with CheckSecurityInterceptor
180
+ * because the checks may miss fields that were not explicitly requested
178
181
  */
179
182
  ignoreSelectionsForPopulate?: boolean;
180
183
 
@@ -99,7 +99,7 @@ export abstract class ModuleService<T extends CoreModel = any> {
99
99
  };
100
100
 
101
101
  // Set default for ignoreSelections if not set
102
- const ignoreSelections = this.configService?.getFastButReadOnly('ignoreSelectionsForPopulate', false);
102
+ const ignoreSelections = this.configService?.getFastButReadOnly('ignoreSelectionsForPopulate', true);
103
103
  if (ignoreSelections) {
104
104
  if (config.processFieldSelection.ignoreSelections === undefined) {
105
105
  config.processFieldSelection.ignoreSelections = ignoreSelections;