github.com/maeglindeveloper/gqlgen@v0.13.1-0.20210413081235-57808b12a0a0/example/chat/schema.graphql (about) 1 type Chatroom { 2 name: String! 3 messages: [Message!]! 4 } 5 6 type Message { 7 id: ID! 8 text: String! 9 createdBy: String! 10 createdAt: Time! 11 } 12 13 type Query { 14 room(name:String!): Chatroom 15 } 16 17 type Mutation { 18 post(text: String!, username: String!, roomName: String!): Message! 19 } 20 21 type Subscription { 22 messageAdded(roomName: String!): Message! 23 } 24 25 scalar Time 26 27 directive @user(username: String!) on SUBSCRIPTION