@@ -40,9 +40,9 @@ const UnknownError = createError('UnknownError', {
4040export const baseResolver = createResolver (
4141 // incoming requests will pass through this resolver like a no-op
4242 null ,
43-
44- /*
45- Only mask outgoing errors that aren't already apollo-errors,
43+
44+ /*
45+ Only mask outgoing errors that aren't already apollo-errors,
4646 such as ORM errors etc
4747 */
4848 (root , args , context , error ) => isInstance (error) ? error : new UnknownError ()
@@ -79,7 +79,7 @@ export const isAdminResolver = isAuthenticatedResolver.createResolver(
7979 the client within the `errors` array in the response.
8080 */
8181 if (! user .isAdmin ) throw new ForbiddenError ();
82-
82+
8383 /*
8484 Since we aren't returning anything from the
8585 request resolver, the request will continue on
@@ -134,7 +134,7 @@ const banUser = isAdminResolver.createResolver(
134134 For admin users, let's tell the user what actually broke
135135 in the case of an unhandled exception
136136 */
137-
137+
138138 if (! isInstance (error)) throw new ExposedError ({
139139 // overload the message
140140 message: error .message
@@ -175,7 +175,7 @@ Resolvers are provided a mutable context object that is shared between all resol
175175``` javascript
176176import express from ' express' ;
177177import bodyParser from ' body-parser' ;
178- import { graphqlExpress } from ' graphql -server-express' ;
178+ import { graphqlExpress } from ' apollo -server-express' ;
179179import { createExpressContext } from ' apollo-resolvers' ;
180180import { formatError as apolloFormatError , createError } from ' apollo-errors' ;
181181
@@ -212,16 +212,16 @@ app.use((req, res, next) => {
212212
213213app .post (' /graphql' , graphqlExpress ((req , res ) => {
214214 const user = req .user ;
215-
215+
216216 const models = {
217217 User: new UserModel (user)
218218 };
219-
219+
220220 const context = createExpressContext ({
221221 models,
222222 user
223223 }, res);
224-
224+
225225 return {
226226 schema,
227227 formatError, // error formatting via apollo-errors
0 commit comments