Skip to content

Commit

Permalink
Undo change to directive merge that broke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvberg committed Aug 16, 2022
1 parent 499acf3 commit 276331c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme

// This property override is specifically to address parity between V1 and V2 when the FF is disabled
// If one subscription is defined, just let the others go to null without FF. But if public and none defined, default all subs
if (!ctx.featureFlags.getBoolean('shouldDeepMergeDirectiveConfigDefaults', false)
&& options?.subscriptions?.level === SubscriptionLevel.public) {
if (!ctx.featureFlags.getBoolean('shouldDeepMergeDirectiveConfigDefaults', false)) {
const publicSubscriptionDefaults = {
onCreate: [getFieldNameFor('onCreate', typeName)],
onDelete: [getFieldNameFor('onDelete', typeName)],
Expand All @@ -251,7 +250,8 @@ export class ModelTransformer extends TransformerModelBase implements Transforme
},
ctx.featureFlags,
);
if (!(baseArgs?.subscriptions?.onCreate || baseArgs?.subscriptions?.onDelete || baseArgs?.subscriptions?.onUpdate)) {
if (baseArgs?.subscriptions?.level === SubscriptionLevel.public
&& !(baseArgs?.subscriptions?.onCreate || baseArgs?.subscriptions?.onDelete || baseArgs?.subscriptions?.onUpdate)) {
options.subscriptions = { level: SubscriptionLevel.public, ...publicSubscriptionDefaults };
}
}
Expand Down

0 comments on commit 276331c

Please sign in to comment.