Created
November 5, 2017 04:37
-
-
Save abhitheawesomecoder/725d9139240439f1f2998e43394cd065 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
makeExecutableSchema, | |
addMockFunctionsToSchema, | |
} from 'graphql-tools'; | |
import resolvers from './resolvers'; | |
const typeDefs = ` | |
type User { | |
id: Int | |
firstName: String | |
lastName: String | |
email: String | |
jwt: String | |
} | |
type Query { | |
user(firstName: String, lastName: String): User | |
allUsers: [User] | |
} | |
type Mutation { | |
createUser(firstName: String!, lastName: String!): User | |
deleteUser(id: Int!): User | |
updateUser(id: Int!, firstName : String!, lastName: String!): User | |
login(email: String!, password: String!): User | |
signup(email: String!, password: String!): User | |
} | |
`; | |
export default makeExecutableSchema({ typeDefs, resolvers }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment