-
Notifications
You must be signed in to change notification settings - Fork 13
/
schema.graphql
63 lines (52 loc) · 1.13 KB
/
schema.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
### This file was generated by Nexus Schema
### Do not make changes to this file directly
type AuthPayload {
token: String!
user: User!
}
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
"""
scalar DateTime
type Feed {
count: Int!
id: ID
links: [Link!]!
}
type Link {
createdAt: DateTime!
description: String!
id: Int!
postedBy: User
url: String!
voters: [User!]!
}
input LinkOrderByInput {
createdAt: Sort
description: Sort
url: Sort
}
type Mutation {
login(email: String!, password: String!): AuthPayload!
post(description: String!, url: String!): Link!
#(email: String!, name: String!, password: String!): AuthPayload!
vote(linkId: Int!): Vote
}
type Query {
feed(filter: String, orderBy: [LinkOrderByInput!], skip: Int, take: Int): Feed!
}
enum Sort {
asc
desc
}
type User {
email: String!
id: Int!
links: [Link!]!
name: String!
votes: [Link!]!
}
type Vote {
link: Link!
user: User!
}