Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a177be

Browse files
author
Sashko Stubailo
committed
Fix new lint stuff
1 parent e9d5379 commit 2a177be

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

api/schema.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { merge } from 'lodash';
2+
import { makeExecutableSchema } from 'graphql-tools';
3+
24
import { schema as gitHubSchema, resolvers as gitHubResolvers } from './github/schema';
35
import { schema as sqlSchema, resolvers as sqlResolvers } from './sql/schema';
4-
import { makeExecutableSchema } from 'graphql-tools';
56
import { pubsub } from './subscriptions';
67

78
const rootSchema = [`
@@ -130,12 +131,10 @@ const rootResolvers = {
130131
context.Comments.submitComment(
131132
repoFullName,
132133
context.user.login,
133-
commentContent
134+
commentContent,
134135
)
135136
))
136-
.then(([id]) =>
137-
context.Comments.getCommentById(id)
138-
)
137+
.then(([id]) => context.Comments.getCommentById(id))
139138
.then((comment) => {
140139
// publish subscription notification
141140
pubsub.publish('commentAdded', comment);
@@ -157,7 +156,7 @@ const rootResolvers = {
157156
return context.Entries.voteForEntry(
158157
repoFullName,
159158
voteValue,
160-
context.user.login
159+
context.user.login,
161160
).then(() => (
162161
context.Entries.getByRepoFullName(repoFullName)
163162
));

api/server.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { graphqlExpress, graphiqlExpress } from 'graphql-server-express';
44
import OpticsAgent from 'optics-agent';
55
import bodyParser from 'body-parser';
66
import { invert, isString } from 'lodash';
7+
import { createServer } from 'http';
8+
import { SubscriptionServer } from 'subscriptions-transport-ws';
79

810
import {
911
GITHUB_CLIENT_ID,
@@ -14,13 +16,9 @@ import { setUpGitHubLogin } from './githubLogin';
1416
import { GitHubConnector } from './github/connector';
1517
import { Repositories, Users } from './github/models';
1618
import { Entries, Comments } from './sql/models';
17-
18-
import { createServer } from 'http';
19-
import { SubscriptionServer } from 'subscriptions-transport-ws';
2019
import { subscriptionManager } from './subscriptions';
2120

2221
import schema from './schema';
23-
2422
import queryMap from '../extracted_queries.json';
2523
import config from './config';
2624

@@ -132,7 +130,7 @@ export function run({
132130
const server = createServer(app);
133131

134132
server.listen(port, () => console.log( // eslint-disable-line no-console
135-
`API Server is now running on http://localhost:${port}`
133+
`API Server is now running on http://localhost:${port}`,
136134
));
137135

138136
// eslint-disable-next-line
@@ -160,7 +158,7 @@ export function run({
160158
{
161159
path: 'subscriptions',
162160
server,
163-
}
161+
},
164162
);
165163

166164
return server;

0 commit comments

Comments
 (0)