-
Notifications
You must be signed in to change notification settings - Fork 7
/
fake.schema
48 lines (43 loc) · 1.42 KB
/
fake.schema
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
# This is sample SDL schema for GraphQL Faker.
#
# There are two directives you can use to enhance fake data:
# - @fake
# - @examples
# Each directive has autocompletion working so start by typing @
#
# Press save or Cmd+Enter to apply the changes and update server. Switch to GraphiQL
# on the left panel to immediately test your changes.
# This tool also supports extending existing APIs. Check graphql-faker --help
#
# Developed with ❤️ by APIs.guru | https://github.com/APIs-guru/graphql-faker
scalar Upload
type Company {
id: ID! @fake(type: uuid)
name: String @fake(type:companyName)
industry: String @examples(values: ["IT", "Manufacturing", "Medicine", "Media"])
employees: [Employee!] @listLength(min: 5, max: 10)
logo: Upload!
logoSmall: Upload
productPhotos: [Upload!]!
productPhotosSmall: [Upload]!
moreImages: [Upload!]
moreImagesSmall: [Upload]
}
type Employee {
id: ID! @fake(type: uuid)
firstName: String @fake(type: firstName, locale:en_CA)
lastName: String @fake(type: lastName, locale:en_CA)
address: String @fake(type:streetAddress, options: { useFullAddress: true })
subordinates: [Employee!] @listLength(min: 0, max: 3)
company: Company
}
input PaginationInput {
limit: Int!
offset: Int!
}
type Query {
employee(id: ID): Employee
company(id: ID): Company
allCompanies: [Company!]
allCompaniesPaginated(pagination: PaginationInput!): [Company!] @listLength(min: 25, max: 25)
}