Advertisement
Guest User

Untitled

a guest
May 31st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. import {
  2. GraphQLObjectType,
  3. GraphQLNonNull,
  4. GraphQLID,
  5. GraphQLString,
  6. } from 'graphql'
  7.  
  8. const User = new GraphQLObjectType({
  9. name: 'User',
  10. description: '...',
  11. fields: () => ({
  12. userId: {
  13. type: new GraphQLNonNull(GraphQLID),
  14. description: '...'
  15. },
  16. firstName: {
  17. type: new GraphQLNonNull(GraphQLString),
  18. description: 'Users firstname'
  19. },
  20. lastName: {
  21. type: new GraphQLNonNull(GraphQLString),
  22. description: 'Users lastname'
  23. },
  24. email: {
  25. type: new GraphQLNonNull(GraphQlString),
  26. description: 'Users email'
  27. },
  28. position: {
  29. type: new GraphQLNonNull(GraphQlString),
  30. description: 'Positon of the user in the company'
  31. },
  32. password: {
  33. type: new GraphQLNonNull(GraphQLString),
  34. description: 'Login password for the user'
  35. },
  36. company: {
  37. type: new GraphQLNonNull(GraphQlString),
  38. description: 'Company the user belongs to'
  39. }
  40. })
  41. })
  42.  
  43. export default User
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement