MM-46869: Fix channel props not appearing in GraphQL (#20944)

The props map was being null, but the schema did not
allow nulls. Therefore, the whole response was being
set to null. There was no error which created more
confusion.

To avoid making the property nillable, which would
mean sending pointers to maps, we just create
empty maps if they are nil.

https://mattermost.atlassian.net/browse/MM-46869

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-09-07 08:38:41 +05:30
коммит произвёл GitHub
родитель 8f743c37b6
Коммит a0ab03a31e
3 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@@ -190,6 +190,10 @@ func (StringInterface) ImplementsGraphQLType(name string) bool {
return name == "StringInterface"
}
func (si StringInterface) MarshalJSON() ([]byte, error) {
return json.Marshal((map[string]any)(si))
}
func (si *StringInterface) UnmarshalGraphQL(input any) error {
json, ok := input.(map[string]any)
if !ok {