Skip to content

Instantly share code, notes, and snippets.

@aqkhan
Created September 1, 2021 10:26
Show Gist options
  • Save aqkhan/2dc6560dae10ea6c117531262d356efc to your computer and use it in GitHub Desktop.
Save aqkhan/2dc6560dae10ea6c117531262d356efc to your computer and use it in GitHub Desktop.
const { gql } = require("apollo-server-express");
const typeDefs = gql`
type Customer {
id: ID
email: String
name: String
active: Boolean
}
type Query {
findAllCustomers: [Customer]
}
type Mutation {
addCustomer(newCustomer: CustomerInput): Customer
deleteCustomer(id: ID!): Customer
findCustomer(id: ID!): Customer
}
`;
module.exports = typeDefs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment