Skip to content

Commit

Permalink
fix(backend): add config option to disable mutation event
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Acar <fatih@opsmill.com>
  • Loading branch information
fatih-acar committed Jan 31, 2025
1 parent c2acdfd commit 6c11f25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/infrahub/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ class AnalyticsSettings(BaseSettings):
class ExperimentalFeaturesSettings(BaseSettings):
model_config = SettingsConfigDict(env_prefix="INFRAHUB_EXPERIMENTAL_")
graphql_enums: bool = False
node_mutated_event: bool = True


class SecuritySettings(BaseSettings):
Expand Down
6 changes: 5 additions & 1 deletion backend/infrahub/graphql/mutations/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ async def mutate(cls, root: dict, info: GraphQLResolveInfo, data: InputObjectTyp
# Reset the time of the query to guarantee that all resolvers executed after this point will account for the changes
context.at = Timestamp()

if config.SETTINGS.broker.enable and context.background:
if (
config.SETTINGS.experimental_features.node_mutated_event
and config.SETTINGS.broker.enable
and context.background
):
log_data = get_log_data()
request_id = log_data.get("request_id", "")

Expand Down

0 comments on commit 6c11f25

Please sign in to comment.