-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathschema.js
93 lines (78 loc) · 1.68 KB
/
schema.js
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
import { makeExecutableSchema } from 'graphql-tools';
import { resolvers } from './resolvers';
const typeDefs = `
enum param {
subject
email
platform
verb
title
}
enum columns {
quiz
post
}
type User {
name: String
email: String
role: String
}
type Note {
_id: ID!
verb: String
title: String
text: String!
courseRef: String
course: String
activityRef: String
activity: String
subjectRef: String
createdAt: String
updatedAt: String
platform: String
author: User
sentiment: Sentiment
}
type Sentiment {
neg: Float
neu: Float
pos: Float
compound: Float
}
type Occupation {
title: String
uri: String
skills: [Skill]
}
type Skill {
title: String
uri: String
}
type Ontask {
email: String!
title: String!
count: Float!
extra: String
}
type Quiz {
score: Float
title: String
verb: String
activity:String
course:String
courseRef: String
subjectRef: String
author: User!
}
type Query {
getSentiment(text: String): Sentiment
searchNotes(search:param, value: String!): [Note]
getOccupations(search: String!): [Occupation]
getQuiz (search:param, value: String!): [Quiz]
}
`;
const schema = makeExecutableSchema({
typeDefs,
resolvers
});
export default schema;