Skip to content

Instantly share code, notes, and snippets.

@kkworden
Created December 10, 2018 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkworden/fcfd07d31a3bd6c2311d5786b9a50785 to your computer and use it in GitHub Desktop.
Save kkworden/fcfd07d31a3bd6c2311d5786b9a50785 to your computer and use it in GitHub Desktop.
Schema with send and receive operations
const buildSchema = require('graphql').buildSchema;
const schema = `
type Query {
messages: [String]
}
type Mutation {
sendMessage(nickname: String!, message: String!): Boolean
}
`;
module.exports = buildSchema(schema);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment