-
Notifications
You must be signed in to change notification settings - Fork 0
/
fauna-schema.gql
41 lines (37 loc) · 1.07 KB
/
fauna-schema.gql
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
type Question {
picture_clue_url: String!
text_clue: String!
answer: String!
author: User @relation(name: "question_creator")
# ratings: [Rating] @relation
usersAnswered: [User] @relation(name: "questions_answered")
inCollection: Collection
public: Boolean
}
type Collection {
name: String!
questions: [Question]
owner: User @relation(name: "collections_owner")
}
type User {
name: String!
email: String!
createdQuestions: [Question] @relation(name: "question_creator")
questionsAnswered: [Question] @relation(name: "questions_answered")
# createdRatings: [Rating] @relation
ownedCollections: [Collection] @relation(name: "collections_owner")
}
# type Rating {
# rater: User!
# question: Question!
# rating: Int!
# }
type Query {
allQuestions: [Question!]
allUser: [User!]
allPublicQuestions(public: Boolean!): [Question!]
# allRatings: [Rating!]
getUserByName(name: String!): User!
getCollectionByName(name: String!): Collection!
# questions_by_reverse_date: [String!, String!]
}