api: Update graphql schema

This commit is contained in:
Kevin Kandlbinder 2022-03-24 16:35:45 +01:00
parent 39f721101e
commit 4f587820d1
9 changed files with 578 additions and 200 deletions

View file

@ -11,6 +11,7 @@ type List struct {
Tags []string `json:"tags"`
RawComments []*model.DBComment
MaintainerIDs []*primitive.ObjectID
CreatorID primitive.ObjectID
}
func MakeList(dbList *model.DBHashList) *List {
@ -20,5 +21,6 @@ func MakeList(dbList *model.DBHashList) *List {
Tags: dbList.Tags,
RawComments: dbList.Comments,
MaintainerIDs: dbList.Maintainers,
CreatorID: dbList.Creator,
}
}

View file

@ -13,9 +13,9 @@ type AddMxid struct {
Mxid string `json:"mxid"`
}
type AddToList struct {
List string `json:"list"`
Entries []string `json:"entries"`
type AddToLists struct {
Lists []string `json:"lists"`
Entry string `json:"entry"`
}
type CommentConnection struct {
@ -143,6 +143,11 @@ type Register struct {
MxID string `json:"mxID"`
}
type RemoveFromLists struct {
Lists []string `json:"lists"`
Entry string `json:"entry"`
}
type RemoveMxid struct {
Mxid string `json:"mxid"`
}