mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
cli(actions): preserve action definition in metadata apply (fix… (#3993)
This commit is contained in:
parent
b87063dc05
commit
28941b4eef
@ -213,6 +213,8 @@ input SampleInput {
|
||||
sdlFromResp.Actions[actionIndex].Permissions = oldAction.Actions[oldActionIndex].Permissions
|
||||
sdlFromResp.Actions[actionIndex].Definition.Kind = oldAction.Actions[oldActionIndex].Definition.Kind
|
||||
sdlFromResp.Actions[actionIndex].Definition.Handler = oldAction.Actions[oldActionIndex].Definition.Handler
|
||||
sdlFromResp.Actions[actionIndex].Definition.ForwardClientHeaders = oldAction.Actions[oldActionIndex].Definition.ForwardClientHeaders
|
||||
sdlFromResp.Actions[actionIndex].Definition.Headers = oldAction.Actions[oldActionIndex].Definition.Headers
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -446,10 +448,6 @@ func (a *ActionConfig) Build(metadata *yaml.MapSlice) error {
|
||||
return fmt.Errorf("custom type %s is not present in %s", customType.Name, graphqlFileName)
|
||||
}
|
||||
}
|
||||
for index, action := range sdlFromResp.Actions {
|
||||
sdlFromResp.Actions[index].Definition.Kind = a.ActionConfig.Kind
|
||||
sdlFromResp.Actions[index].Definition.Handler = a.ActionConfig.HandlerWebhookBaseURL + "/" + action.Name
|
||||
}
|
||||
if len(sdlFromResp.Actions) != 0 {
|
||||
actionItem := yaml.MapItem{
|
||||
Key: "actions",
|
||||
|
Loading…
Reference in New Issue
Block a user