You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although Action.FunctionRef.Invoke field is set in the JSON while unmarshaling into a struct the field is not set. Seems due to the fact that its of InvokeType.
Expect to unmarshal correclty
set invoke in FuncRef Action and try to unmarshal into a struct
func (f *FunctionRef) UnmarshalJSON(data []byte) error {
funcRef := make(map[string]interface{})
if err := json.Unmarshal(data, &funcRef); err != nil {
f.RefName, err = unmarshalString(data)
if err != nil {
return err
}
return nil
}
f.RefName = requiresNotNilOrEmpty(funcRef["refName"])
if _, found := funcRef["arguments"]; found {
f.Arguments = funcRef["arguments"].(map[string]interface{})
}
f.SelectionSet = requiresNotNilOrEmpty(funcRef["selectionSet"])
// Missing part ?
if _, found := funcRef["invoke"]; found {
if invoke, ok := funcRef["invoke"].(string); ok {
f.Invoke = InvokeType(invoke)
}
}
// End of Missing part
return nil
}
The text was updated successfully, but these errors were encountered:
Although Action.FunctionRef.Invoke field is set in the JSON while unmarshaling into a struct the field is not set. Seems due to the fact that its of InvokeType.
Expect to unmarshal correclty
set invoke in FuncRef Action and try to unmarshal into a struct
The text was updated successfully, but these errors were encountered: