-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.graphql
63 lines (50 loc) · 1.24 KB
/
test.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
"""The DateTime scalar type represents a date and time."""
scalar DateTime
interface HasName {
name: String!
}
type Mutation
"""The PaginateInfo type represents information about a paginated list."""
type PaginateInfo {
currentPage: Int!
totalPage: Int!
hasNextPage: Boolean!
totalCount: Int!
}
type Post {
content: String!
userId: ID!
user: User!
title: String!
}
"""The PostPaginateResponse type represents a paginated list of Post."""
type PostPaginateResponse {
data: [Post!]!
paginateInfo: PaginateInfo!
}
type Query {
users(page: Int = 1, size: Int = 10, sort: SortOrder = ASC): [User!]!
posts(page: Int = 1, size: Int = 10, sort: SortOrder = ASC): [Post!]!
}
"""The SortOrder enum type represents the order of a list."""
enum SortOrder {
"""The ASC enum value represents ascending order."""
ASC
"""The DESC enum value represents descending order."""
DESC
}
type Subscription
"""test user"""
type User implements HasName {
name: String!
posts(size: Int = 10, sort: SortOrder = ASC, page: Int = 1): [Post!]!
}
interface Userable {
userId: ID!
user: User!
}
"""The UserPaginateResponse type represents a paginated list of User."""
type UserPaginateResponse {
data: [User!]!
paginateInfo: PaginateInfo!
}