Skip to content

Instantly share code, notes, and snippets.

@kabece
Created October 3, 2021 07:47
Show Gist options
  • Save kabece/2a34387023473d9a468a3834ce2996d6 to your computer and use it in GitHub Desktop.
Save kabece/2a34387023473d9a468a3834ce2996d6 to your computer and use it in GitHub Desktop.
package model
type ChatRoom struct {
ID string `json:"id"`
MessagesConnection *MessagesConnection `json:"messagesConnection"`
}
type Message struct {
ID string `json:"id"`
Text *string `json:"text"`
}
type MessagesConnection struct {
Edges []*MessagesEdge `json:"edges"`
PageInfo *PageInfo `json:"pageInfo"`
}
type MessagesEdge struct {
Cursor string `json:"cursor"`
Node *Message `json:"node"`
}
type PageInfo struct {
StartCursor string `json:"startCursor"`
EndCursor string `json:"endCursor"`
HasNextPage *bool `json:"hasNextPage"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment