Advertisement
Guest User

Untitled

a guest
Aug 26th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. // Import commands here ...
  2.  
  3. var UserType = new GraphQLObjectType({
  4. name: 'User',
  5. allowedRoles: ['admin.all', 'user.read'],
  6. fields: () => ({
  7. _id: { ... },
  8. username: { ... },
  9. password: { ... },
  10. token: { ... },
  11. role: { ... },
  12. name: {
  13. type: GraphQLString,
  14. allowedRoles: ['user.read'],
  15. description: 'User\'s first name.'
  16. },
  17. surname: {
  18. type: GraphQLString,
  19. allowedRoles: ['user.read'],
  20. description: 'User\'s second name.'
  21. },
  22. phoneNumber: {
  23. type: new GraphQLList(PhoneNumberType.ObjectType),
  24. allowedRoles: ['user.read'],
  25. },
  26. emailAddress: {
  27. type: new GraphQLList(EmailAddressType.ObjecType),
  28. allowedRoles: ['user.read'],
  29. },
  30. locale: { ... },
  31. isEnabled: { ... },
  32. lastLoginTimestamp: { ... },
  33. createdAt: { ... },
  34. createdBy: { ... },
  35. updatedAt: { ... },
  36. updatedBy: { ... }
  37. })
  38. });
  39.  
  40. export default UserType;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement