-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmultiple-annotations.go
More file actions
38 lines (36 loc) · 1.05 KB
/
multiple-annotations.go
File metadata and controls
38 lines (36 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package examples
/**
* @gqlType(name:"User",description:"Regular user account")
* @gqlType(name:"AdminUser",description:"Administrator account with elevated privileges")
* @gqlInput(name:"CreateUserInput",description:"Input for creating a new user")
* @gqlInput(name:"UpdateUserInput",description:"Input for updating existing user")
*/
type UserDTO struct {
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
/**
* @gqlField(name:"fullName")
*/
Name string `json:"name"`
/**
* @gqlField(ignore:"true")
*/
PasswordHash string `json:"-"`
}
/**
* @gqlType(name:"Product")
* @gqlType(name:"ProductPreview",ignoreAll:"true")
* @gqlTypeExtraField(name:"title",type:"String!",description:"Product title for preview")
* @gqlInput(name:"ProductInput")
*/
type ProductDTO struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Price float64 `json:"price"`
/**
* @gqlField(include:"true")
*/
InternalCode string `json:"internal_code"`
}