Server
TypeDefs / Schema
const typeDefs = [`
type UserDetails {
id: String
name: String
email: String
}
// Query(GET) endpoints typedefs go inside the parent type `Query`
type Query {
UserDetails: UserDetails
}
// Mutations(PUT/POST) endpoints typedefs go inside the parent type `Mutation`
type Mutation {
UserEmail(id: String!, email: String!): Channel
}
`];Resolvers
Make Executable Schema
Set up Express to use graphQLExpress middleware
Last updated