-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.faker.graphql
70 lines (65 loc) · 2.01 KB
/
schema.faker.graphql
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
type User {
userID: Int! @fake(type: number)
userFirstName: String @fake(type: firstName)
userLastName: String @fake(type: lastName)
userStreet: String @fake(type: streetAddress)
userCity: String @fake(type: city)
userState: String @fake(type: state)
userPostCode: Int @fake(type: zipCode)
userEmail: String!
userPasswordHash: String!
userEmailVerified: Boolean! @examples(values: [true, false])
roleID: Int!
role: Role
listings: [Listing]
}
type Role {
roleID: Int! @fake(type: number)
roleName: String! @fake(type: lorem)
users: [User]
}
type Listing {
listingID: String @fake(type: number)
listingPostCode: String @fake(type: number)
listingType: String @examples(values: ["product" "service"])
listingTitle: String @fake(type: word)
listingCategory: String @fake(type: productCategory)
listingCondition: String @fake(type: word)
listingAvailibility: String @fake(type: date)
listingPrice: String @fake(type: number)
listingDescription: String
@examples(
values: [
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, "
]
)
listingImageURL: String
@examples(
values: [
"https://picsum.photos/100?random=1"
"https://picsum.photos/100?random=2"
"https://picsum.photos/100?random=3"
"https://picsum.photos/100?random=4"
"https://picsum.photos/100?random=5"
"https://picsum.photos/100?random=6"
]
)
}
type Query {
userByEmail(email: String, password: String): User
listingsByFilter(listingPostCode: Int,listingType: String,listingCategory: String): [Listing]@listLength(min: 10, max: 30)
}
input AddUserInput {
userFirstName: String
userLastName: String
userStreet: String
userCity: String
userState: String
userPostCode: Int!
userEmail: String
userPassword: String
}
type Mutation {
createUser(input: AddUserInput): User
deleteUser(userID: Int!): Boolean!
}