feat: admin logging + search

This commit is contained in:
Nicolas Giard
2018-09-01 22:37:20 -04:00
parent 5919d14670
commit 019537563e
15 changed files with 550 additions and 69 deletions

View File

@@ -92,12 +92,6 @@ type Right {
group: Group!
}
type SearchResult {
path: String
title: String
tags: [String]
}
type Setting {
id: Int!
createdAt: Date
@@ -133,7 +127,6 @@ type Query {
files(id: Int): [File]
folders(id: Int, name: String): [Folder]
rights(id: Int): [Right]
search(q: String, tags: [String]): [SearchResult]
settings(key: String): [Setting]
tags(key: String): [Tag]
translations(locale: String!, namespace: String!): [Translation]

View File

@@ -0,0 +1,54 @@
# ===============================================
# LOGGING
# ===============================================
extend type Query {
logging: LoggingQuery
}
extend type Mutation {
logging: LoggingMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type LoggingQuery {
loggers(
filter: String
orderBy: String
): [Logger]
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type LoggingMutation {
updateLoggers(
loggers: [LoggerInput]
): DefaultResponse
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type Logger {
isEnabled: Boolean!
key: String!
title: String!
description: String
logo: String
website: String
level: String
config: [KeyValuePair]
}
input LoggerInput {
isEnabled: Boolean!
key: String!
level: String!
config: [KeyValuePairInput]
}

View File

@@ -0,0 +1,52 @@
# ===============================================
# SEARCH
# ===============================================
extend type Query {
search: SearchQuery
}
extend type Mutation {
search: SearchMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type SearchQuery {
searchEngines(
filter: String
orderBy: String
): [SearchEngine]
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type SearchMutation {
updateSearchEngines(
searchEngines: [SearchEngineInput]
): DefaultResponse
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type SearchEngine {
isEnabled: Boolean!
key: String!
title: String!
description: String
logo: String
website: String
config: [KeyValuePair]
}
input SearchEngineInput {
isEnabled: Boolean!
key: String!
config: [KeyValuePairInput]
}