graph2: Added importLog query and associated models and repository functions.
the build was successful

This commit is contained in:
2018-12-01 16:52:06 +01:00
parent 2a91b6f9bc
commit a58535fcb9
11 changed files with 282 additions and 6 deletions
+3
View File
@@ -95,6 +95,9 @@ type Mutation {
# Add a new log
addLog(input: LogAddInput!): Log!
# Import a log
importLog(input: LogImportInput!): [Log!]!
# Edit a log
editLog(input: LogEditInput!): Log!
+32
View File
@@ -100,4 +100,36 @@ input LogEditInput {
input LogRemoveInput {
# The id of the log to remove
id: String!
}
"""
Input for importLog mutation.
"""
input LogImportInput {
"The channel of the log, alwyas required."
channelName: String!
"Which importer to use."
importer: LogImporter!
"The timezone of the import, all log and post dates will be treated as it. It will be UTC if none is specified."
timezone: String
"The date of the log, if not provided in the log body."
date: Date
"The log body itself."
data: String!
}
enum LogImporter {
"""
mIRC-like: This importer parses logs that copied from mIRC posts without spaces.
"""
MircLike
"""
Forum log: This importer parses the format on the forum. The displayed log, not the post source.
"""
ForumLog
}