adding some data to error returning
This commit is contained in:
1 parent
df4dbef6d0
commit
205b451495
1 file changed
+8
@@ -43,6 +43,14 @@ app.use('/graphql', graphqlHTTP(req => ({
|
||||
userId: req.headers.userid,
|
||||
authorization: req.headers.authorization,
|
||||
},
|
||||
formatError(err) {
|
||||
return {
|
||||
message: err.message,
|
||||
code: err.originalError && err.originalError.code,
|
||||
locations: err.locations,
|
||||
path: err.path,
|
||||
};
|
||||
},
|
||||
})));
|
||||
app.get('/playground', expressPlayground({ endpoint: '/graphql' }));
|
||||
|
||||
|
||||
Reference in new issue
Block a user