-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
50 lines (42 loc) · 1022 Bytes
/
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
### This file was generated by Nexus Schema
### Do not make changes to this file directly
type AuthPayload {
token: String!
user: User!
}
input CardOrderByInput {
answer: Sort
createdAt: Sort
details: Sort
id: Sort
question: Sort
}
type Flashcard {
answer: String!
cardOwner: User
details: String!
id: Int!
image: String
isDone: Boolean
question: String!
}
type Mutation {
deleteFlashcard(id: Int!): Flashcard!
login(email: String!, password: String!): AuthPayload!
post(answer: String!, details: String!, image: String, question: String!): Flashcard!
signup(email: String!, name: String!, password: String!): AuthPayload!
updateFlashcard(answer: String, details: String, id: Int!, image: String, isDone: Boolean, question: String): Flashcard!
}
type Query {
allFlashcards(filter: String, limit: Int, offset: Int, orderBy: [CardOrderByInput!]): [Flashcard!]!
}
enum Sort {
asc
desc
}
type User {
email: String!
flashcards: [Flashcard!]!
id: Int!
name: String!
}