David Glasser
5c65742a39
Factor out runQuery's use of logFunction into an extension ( #1128 )
...
This requires a slightly newer graphql-extensions beta which has more arguments
to requestDidStart.
Also make it ok to not pass logFunction to formatApolloErrors, and make sure
custom fieldResolvers continue to work with extensions (by upgrading the
dependency and fixing a logic bug).
The custom fieldResolvers fix means that we now unconditionally put the
extension stack on the GraphQL context, which means that the context can no
longer be (say) a string. I changed a test that expected string contexts to
work. You couldn't use a string for a context when using extensions before, so
this isn't that big of a change.
2018-06-01 21:16:25 -07:00
David Glasser
836616bd04
Turn on noUnusedLocals and noUnusedParameters ( #1126 )
2018-06-01 15:16:16 -07:00
Evans Hauser
63d0f72115
core: error resurfacing for merged schemas that hide errors in a CombineErrors
2018-05-30 22:40:27 -07:00
Evans Hauser
7d17f1f379
core: made name non-eunumerable in ApolloError and removed extra code in tests
2018-05-30 16:41:42 -07:00
Evans Hauser
2e9d4689b5
apollo-server-core: add comment about ApolloError construction
2018-05-21 16:08:32 -07:00
Evans Hauser
23f5b76f10
apollo-server-core: ApolloError extends Error and implements GraphQLError
2018-05-21 15:41:36 -07:00
Evans Hauser
3c71f34cee
apollo-server-core: set error prototypes explicitly
2018-05-20 02:07:46 -07:00
Evans Hauser
226770819d
apollo-server-core: check for options as optional
2018-05-16 15:57:51 -07:00
Evans Hauser
8e1f3545c4
apollo-server-core: type errors returned as ApolloErrors and add ability to reference arbitrary fields
2018-05-16 14:46:33 -07:00
Evans Hauser
ccb6eea934
apollo-server-core: enrichError not exported and moved formatter check to out of map
2018-05-11 15:54:21 -07:00
Evans Hauser
1f3103b5c7
apollo-server-core: use getOwnPropertyNames to stay es5
2018-05-11 15:53:19 -07:00
Evans Hauser
c4e3766475
apollo-server-core: add check for null property in ApolloError
2018-05-11 15:53:18 -07:00
Evans Hauser
4645f200f2
apollo-server-core: apolloError places properties in root, so they are found in originalError
2018-05-11 15:53:17 -07:00
Evans Hauser
2a510039ec
apollo-server-core: internalFormatError to formatApolloError
2018-05-11 15:53:16 -07:00
Evans Hauser
f6eece6294
apollo-server-core: move logging into separate file
2018-05-11 15:53:16 -07:00
Evans Hauser
7b25a90a7e
apollo-server: add message, location, and path to formatError
2018-05-11 15:53:14 -07:00
Evans Hauser
d88100aca8
errors: change formatError to internalFormatError and fix when user defines formatError
2018-05-11 15:53:10 -07:00
Evans Hauser
cb09fef524
Errors: latest codes and add exports to the apollo-server package
2018-05-11 15:53:10 -07:00
Evans Hauser
35a5858125
errors: change INTERNAL_ERROR to INTERNAL_SERVER_ERROR, matching http errors
2018-05-11 15:53:09 -07:00
James Baxley
bdabe6259b
fix odd case in error handling
2018-05-11 15:53:08 -07:00
Evans Hauser
0e68e2ec4f
errors: send stack in debug, codes, make ApolloErrors
2018-05-11 15:53:07 -07:00