Skip to content

Commit 1f5e906

Browse files
committed
Apply formatting
1 parent 8e7c28d commit 1f5e906

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/graphiqlHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const graphiqlHandler: Handler = (_, res) => {
77
return res.end(
88
getGraphiqlHtml({
99
endpoint: '/graphql',
10-
})
10+
}),
1111
);
1212
};
1313

src/jsonGraphqlExpress.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ describe('integration tests', () => {
102102
}));
103103
test('allows multiple mutations', () =>
104104
gqlAgent(
105-
'mutation{ updatePost(id:"2", title:"Foo bar", views: 200, user_id:"123") { id } }'
105+
'mutation{ updatePost(id:"2", title:"Foo bar", views: 200, user_id:"123") { id } }',
106106
)
107107
.then(() =>
108108
gqlAgent(
109-
'mutation{ updatePost(id:"2", title:"Foo bar", views: 200, user_id:"123") { id } }'
110-
)
109+
'mutation{ updatePost(id:"2", title:"Foo bar", views: 200, user_id:"123") { id } }',
110+
),
111111
)
112112
.then((res) =>
113-
expect(res.body).toEqual({ data: { updatePost: { id: '2' } } })
113+
expect(res.body).toEqual({ data: { updatePost: { id: '2' } } }),
114114
));
115115
});

src/schemaBuilder.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test('plugs resolvers with schema', () => {
1212
}).then((result) =>
1313
expect(result).toEqual({
1414
data: { Post: { id: '0', title: 'hello' } },
15-
})
15+
}),
1616
);
1717
});
1818

@@ -56,7 +56,7 @@ test('all* route returns all entities by default', () =>
5656
data: {
5757
allPosts: [{ id: '1' }, { id: '2' }, { id: '3' }],
5858
},
59-
})
59+
}),
6060
));
6161
test('all* route supports pagination', () =>
6262
graphql({
@@ -67,7 +67,7 @@ test('all* route supports pagination', () =>
6767
data: {
6868
allPosts: [{ id: '1' }, { id: '2' }],
6969
},
70-
})
70+
}),
7171
));
7272
test('all* route supports sorting', () =>
7373
graphql({
@@ -78,7 +78,7 @@ test('all* route supports sorting', () =>
7878
data: {
7979
allPosts: [{ id: '1' }, { id: '3' }, { id: '2' }],
8080
},
81-
})
81+
}),
8282
));
8383
test('all* route supports filtering', () =>
8484
graphql({
@@ -89,15 +89,15 @@ test('all* route supports filtering', () =>
8989
data: {
9090
allPosts: [{ id: '1' }],
9191
},
92-
})
92+
}),
9393
));
9494
test('entity route returns a single entity', () =>
9595
graphql({ schema, source: '{ Post(id: 2) { id } }' }).then((result) =>
9696
expect(result).toEqual({
9797
data: {
9898
Post: { id: '2' },
9999
},
100-
})
100+
}),
101101
));
102102
test('entity route gets all the entity fields', () =>
103103
graphql({
@@ -113,14 +113,14 @@ test('entity route gets all the entity fields', () =>
113113
views: 254,
114114
},
115115
},
116-
})
116+
}),
117117
));
118118
test('entity route get many to one relationships fields', () =>
119119
graphql({ schema, source: '{ Post(id: 1) { User { name } } }' }).then(
120120
(result) =>
121121
expect(result).toEqual({
122122
data: { Post: { User: { name: 'John Doe' } } },
123-
})
123+
}),
124124
));
125125
test('entity route get one to many relationships fields', () =>
126126
graphql({ schema, source: '{ Post(id: 1) { Comments { body } } }' }).then(
@@ -134,13 +134,13 @@ test('entity route get one to many relationships fields', () =>
134134
],
135135
},
136136
},
137-
})
137+
}),
138138
));
139139
test('returns an error when asked for a non existent field', () =>
140140
graphql({ schema, source: '{ Post(id: 1) { foo } }' }).then((result) => {
141141
expect(result.errors).toHaveLength(1);
142142
const errors = result.errors as any[];
143143
expect(errors[0].message).toEqual(
144-
'Cannot query field "foo" on type "Post".'
144+
'Cannot query field "foo" on type "Post".',
145145
);
146146
}));

0 commit comments

Comments
 (0)