Skip to content

Commit

Permalink
Style Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mallocator committed Dec 6, 2023
1 parent 7b3a556 commit ce8cf8b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 31 deletions.
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@
"sourceType": "module"
},
"rules": {
"multiline-comment-style": [
"error",
"starred-block"
],
"no-lonely-if": "error",
"comma-dangle": [
"error",
"never"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"indent": [
"error",
2
Expand All @@ -33,6 +49,10 @@
"error",
"last"
],
"curly": [
"error",
"all"
],
"no-unused-vars": [
"warn"
],
Expand Down
4 changes: 2 additions & 2 deletions resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const Query = {
messages = [...sourceHistory, ...targetHistory]
}
return messages
.sort((a, b) => a.timestamp - b.timestamp)
.map((msg) => msg.toObject())
.sort((a, b) => a.timestamp - b.timestamp)
.map((msg) => msg.toObject())
}
}

Expand Down
58 changes: 29 additions & 29 deletions schema.graphql
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
type Query {
agents: [Agent]
drivers: [Driver]
groups: [Group]
history(target: String, source: String): [Message]!
agents: [Agent]
drivers: [Driver]
groups: [Group]
history(target: String, source: String): [Message]!
}

type Agent {
name: String!
config: AgentConfig!
driver: Driver!
name: String!
config: AgentConfig!
driver: Driver!
}

type AgentConfig {
type: String!
description: String
creator: Boolean
isolate: Boolean
driver: DriverConfig!
type: String!
description: String
creator: Boolean
isolate: Boolean
driver: DriverConfig!
}

type DriverConfig {
type: String!
type: String!
}

type Driver {
type: String!
type: String!
}

type Group {
name: String!
members: [String]
name: String!
members: [String]
}

type Message {
id: Float
source: String
target: String!
timestamp: String
content: String!
type: String!
id: Float
source: String
target: String!
timestamp: String
content: String!
type: String!
}

type Mutation {
sendMessage(message: String!, target: String!, source: String): Message
createGroup(name: String!): String
createAgent(name: String!, driver: String!): Agent
sendMessage(message: String!, target: String!, source: String): Message
createGroup(name: String!): String
createAgent(name: String!, driver: String!): Agent
}

type Subscription {
messageCreated: Message
groupCreated: Group
groupUpdated: Group
agentCreated: Agent
messageCreated: Message
groupCreated: Group
groupUpdated: Group
agentCreated: Agent
}

0 comments on commit ce8cf8b

Please sign in to comment.