Skip to content

Commit

Permalink
In a config is disabled, run the commands in NOP mode at client level
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Mar 28, 2021
1 parent d1b28c7 commit 5b18649
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/ontrackGraphQLClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import (

// GraphQLCall performs a GraphQL query/mutation to Ontrack
func GraphQLCall(config *config.Config, query string, variables map[string]interface{}, data interface{}) error {

// If config is disabled, skips the call
if config.Disabled {
return nil
}

body := map[string]interface{}{
"query": query,
"variables": variables,
Expand Down

0 comments on commit 5b18649

Please sign in to comment.