README ¶ chat app Example app using subscriptions to build a chat room. to run this server go run ./example/chat/server/server.go to run the react app cd ./example/chat npm install npm run start Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func MakeExecutableSchema(resolvers Resolvers) graphql.ExecutableSchema func New() *resolvers type Chatroom type Message type Resolvers Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func MakeExecutableSchema ¶ func MakeExecutableSchema(resolvers Resolvers) graphql.ExecutableSchema func New ¶ func New() *resolvers Types ¶ type Chatroom ¶ type Chatroom struct { Name string Messages []Message Observers map[string]chan Message } type Message ¶ type Message struct { ID string `json:"id"` Text string `json:"text"` CreatedBy string `json:"createdBy"` CreatedAt time.Time `json:"createdAt"` } type Resolvers ¶ type Resolvers interface { Mutation_post(ctx context.Context, text string, username string, roomName string) (Message, error) Query_room(ctx context.Context, name string) (*Chatroom, error) Subscription_messageAdded(ctx context.Context, roomName string) (<-chan Message, error) } Source Files ¶ View all Source files generated.go models_gen.go resolvers.go Directories ¶ Show internal Expand all Path Synopsis server Click to show internal directories. Click to hide internal directories.