Skip to content

Instantly share code, notes, and snippets.

@kluu1
Last active March 19, 2020 04:03
Show Gist options
  • Select an option

  • Save kluu1/d204626238c2edc166a6feb100236c29 to your computer and use it in GitHub Desktop.

Select an option

Save kluu1/d204626238c2edc166a6feb100236c29 to your computer and use it in GitHub Desktop.
const { gql } = require('apollo-server');
const typeDefs = gql`
type User {
id: Int!
firstName: String!
lastName: String!
userName: String!
email: String!
jobTitle: String
}
type UsersResult {
users: [User]
currentPage: Int
totalPages: Int
}
type Query {
getUsers(search: String, page: Int, limit: Int): UsersResult
}
`;
module.exports = typeDefs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment