-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema_simple.graphql
96 lines (88 loc) · 1.72 KB
/
schema_simple.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
scalar Date
enum SortOrder {
ASC
DESC
}
enum PostOrderBy {
CREATED_AT
}
type Location {
latitude: Float!
longitude: Float!
}
input LocationInput {
latitude: Float!
longitude: Float!
}
type User {
id: Int!
sub: String!
first_name: String!
last_name: String!
email: String!
phoneNumber: String
bio: String
posts: [Post!]
homeLocation: Location
verified: Boolean!
createdAt: Date!
updatedAt: Date!
profileImageURL: String
}
type Post {
id: Int!
photoURL: String!
caption: String
author: User!
location: Location!
tags: [String!]
createdAt: Date!
updatedAt: Date!
}
type Query {
getUser(id: ID!): User
getPost(id: ID!): Post
searchUsers(query: String!): [User!]!
searchPosts(query: String!): [Post!]!
getPostsNearLocation(
first: Int
after: String
latitude: Float!
longitude: Float!
distance: Float!
orderBy: PostOrderBy
order: SortOrder
): [Post!]!
hello: String
}
type Mutation {
createPost(
photoURL: String!
caption: String
userId: ID!
tags: [String!]
location: LocationInput!
): Post
updateUserHomeLocation(userId: ID!, homeLocation: LocationInput!): User
updatePost(
id: ID!
photoURL: String
caption: String
tags: [String!]
location: LocationInput
): Post
deletePost(id: ID!): Boolean
createUser(
sub: String!
first_name: String!
last_name: String!
email: String!
phoneNumber: String
bio: String
profileImageURL: String
): User
updateUserProfileImage(userId: ID!, profileImageURL: String!): User
verifyUser(id: ID!): User
updateUserVerifiedStatus(id: ID!, verified: Boolean!): User
updateUser(id: ID!, email: String, phoneNumber: String, bio: String): User
}