-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphqls
More file actions
53 lines (44 loc) · 829 Bytes
/
schema.graphqls
File metadata and controls
53 lines (44 loc) · 829 Bytes
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
type Link {
id: ID!
url: String!
description: String
postedBy: User
}
type User {
id: ID!
name: String!
email: String
password: String
}
input AuthData {
email: String!
password: String!
}
type SigninPayload {
token: String
user: User
}
type Vote {
id: ID!
createdAt: DateTime!
user: User!
link: Link!
}
scalar DateTime
input LinkFilter {
description_contains: String
url_contains: String
}
type Query {
allLinks(filter: LinkFilter, skip: Int = 0, first: Int = 0): [Link]
}
type Mutation {
createLink(url: String!, description: String!): Link
createUser(name: String!, auth: AuthData!): User
signinUser(auth: AuthData): SigninPayload
createVote(linkId: ID, userId: ID): Vote
}
schema {
query: Query
mutation: Mutation
}