@things-factory/contact 7.0.72 → 7.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/contact",
3
- "version": "7.0.72",
3
+ "version": "7.0.73",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -36,5 +36,5 @@
36
36
  "@things-factory/auth-base": "^7.0.72",
37
37
  "@things-factory/shell": "^7.0.72"
38
38
  },
39
- "gitHead": "6131a0f20fcc11bc8e9e9d839de8e9700a2b0ac0"
39
+ "gitHead": "5ce078745084f07a5df7d1ac9de56b2699a07a34"
40
40
  }
@@ -1,4 +1,5 @@
1
1
  import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'
2
+ import { GraphQLEmailAddress } from 'graphql-scalars'
2
3
  import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
3
4
  import { User } from '@things-factory/auth-base'
4
5
  import { Attachment } from '@things-factory/attachment-base'
@@ -74,7 +75,7 @@ export class ContactQuery {
74
75
  return getContactItem(contact, ContactField.Phone, 'work')
75
76
  }
76
77
 
77
- @FieldResolver(type => String, { nullable: true })
78
+ @FieldResolver(type => GraphQLEmailAddress, { nullable: true })
78
79
  async email(@Root() contact: Contact): Promise<string> {
79
80
  return getContactItem(contact, ContactField.Email, 'work')
80
81
  }
@@ -61,17 +61,17 @@ export class Contact {
61
61
  @Field({ nullable: true })
62
62
  company?: string
63
63
 
64
- // @Field(type => GraphQLEmailAddress, { nullable: true })
65
- // email?: string
64
+ @Field(type => GraphQLEmailAddress, { nullable: true })
65
+ email?: string
66
66
 
67
- // @Field({ nullable: true })
68
- // phone?: string
67
+ @Field({ nullable: true })
68
+ phone?: string
69
69
 
70
- // @Field({ nullable: true })
71
- // address?: string
70
+ @Field({ nullable: true })
71
+ address?: string
72
72
 
73
- // @Field({ nullable: true })
74
- // department?: string
73
+ @Field({ nullable: true })
74
+ department?: string
75
75
 
76
76
  @Column({ nullable: true })
77
77
  @Field({ nullable: true })