@simtlix/simfinity-js 2.4.2 → 2.4.4
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/.cursor/rules/simfinity-architecture.mdc +71 -0
- package/.cursor/rules/simfinity-auth-module.mdc +100 -0
- package/.cursor/rules/simfinity-coding-standards.mdc +62 -0
- package/.cursor/rules/simfinity-core-functions.mdc +82 -0
- package/.cursor/rules/simfinity-documentation.mdc +59 -0
- package/.cursor/rules/simfinity-extensions.mdc +121 -0
- package/.cursor/rules/simfinity-testing.mdc +90 -0
- package/README.md +1428 -1446
- package/package.json +1 -1
- package/src/auth/index.js +6 -6
- package/src/index.js +4 -1
package/package.json
CHANGED
package/src/auth/index.js
CHANGED
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
*
|
|
17
17
|
* const permissions = {
|
|
18
18
|
* Query: {
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* series: requireAuth(),
|
|
20
|
+
* seasons: requireAuth(),
|
|
21
21
|
* },
|
|
22
22
|
* Mutation: {
|
|
23
|
-
*
|
|
23
|
+
* deleteserie: requireRole('admin'),
|
|
24
|
+
* deletestar: requireRole('admin'),
|
|
24
25
|
* },
|
|
25
|
-
*
|
|
26
|
+
* serie: {
|
|
26
27
|
* '*': requireAuth(),
|
|
27
|
-
* email: requireRole('ADMIN')
|
|
28
28
|
* }
|
|
29
29
|
* };
|
|
30
30
|
*
|
|
31
|
-
* const authPlugin = createAuthPlugin(permissions, { defaultPolicy: '
|
|
31
|
+
* const authPlugin = createAuthPlugin(permissions, { defaultPolicy: 'ALLOW' });
|
|
32
32
|
* const yoga = createYoga({ schema, plugins: [authPlugin] });
|
|
33
33
|
*/
|
|
34
34
|
|
package/src/index.js
CHANGED
|
@@ -680,7 +680,10 @@ const onUpdateSubject = async (Model, gqltype, controller, args, session, linkTo
|
|
|
680
680
|
|
|
681
681
|
if (args[fieldEntryName] === null
|
|
682
682
|
&& !(fieldEntry.type instanceof GraphQLNonNull)) {
|
|
683
|
-
materializedModel.modelArgs = {
|
|
683
|
+
materializedModel.modelArgs = {
|
|
684
|
+
...materializedModel.modelArgs,
|
|
685
|
+
$unset: { ...materializedModel.modelArgs.$unset, [fieldEntryName]: '' },
|
|
686
|
+
};
|
|
684
687
|
}
|
|
685
688
|
});
|
|
686
689
|
|