Files
apollo/tests/ssr/apollo-server/schema.graphql
T
Guillaume Chau 6afceecd32 test(e2e): SSR
2019-10-21 12:15:25 +02:00

61 lines
1017 B
GraphQL

"Included scalars"
scalar JSON
scalar Upload
"It will increment!"
type Counter {
"Number of increments"
count: Int!
"Full message for testing"
countStr: String
}
"A text message send by users"
type Message {
id: ID!
"Message content"
text: String!
}
"Input from user to create a message"
input MessageInput {
"Message content"
text: String!
}
type File {
id: ID!
path: String!
filename: String!
mimetype: String!
encoding: String!
}
type Query {
"Test query with a parameter"
hello(name: String): String!
"List of messages sent by users"
messages: [Message]
uploads: [File]
}
type Mutation {
myMutation: String!
"Add a message and publish it on 'messages' subscription channel"
addMessage (input: MessageInput!): Message!
singleUpload (file: Upload!): File!
multipleUpload (files: [Upload!]!): [File!]!
}
type Subscription {
mySub: String!
"This will update every 2 seconds"
counter: Counter!
"When a new message is added"
messageAdded: Message!
}