Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Import commands here ...
- var UserType = new GraphQLObjectType({
- name: 'User',
- allowedRoles: ['admin.all', 'user.read'],
- fields: () => ({
- _id: { ... },
- username: { ... },
- password: { ... },
- token: { ... },
- role: { ... },
- name: {
- type: GraphQLString,
- allowedRoles: ['user.read'],
- description: 'User\'s first name.'
- },
- surname: {
- type: GraphQLString,
- allowedRoles: ['user.read'],
- description: 'User\'s second name.'
- },
- phoneNumber: {
- type: new GraphQLList(PhoneNumberType.ObjectType),
- allowedRoles: ['user.read'],
- },
- emailAddress: {
- type: new GraphQLList(EmailAddressType.ObjecType),
- allowedRoles: ['user.read'],
- },
- locale: { ... },
- isEnabled: { ... },
- lastLoginTimestamp: { ... },
- createdAt: { ... },
- createdBy: { ... },
- updatedAt: { ... },
- updatedBy: { ... }
- })
- });
- export default UserType;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement