Fixes#1613.
We always send traces that includes an error node if the trace has an
error. In the case that sending errors is disabled, we replace the
message and remove the location.
Note that the Engine proxy strips all error information from the traces
with noErrorTraces set. To get errors to show up in the ui, the proxy
sends error counts inside of the aggregated stats reports. To get
similar behavior inside of the apollo server metrics reporting, we
always send a trace and mask out the PII.
* docs: Correct path for GraphQL Playground.
This corrects the documentation which incorrectly stated that the message on the console would include `http://localhost:4000/graphql`.
While the `/graphql` URL will also serve the GraphQL Playground, it's only working as a by-product of of `/graphql` being included within the (higher) `/` path. (That is to say that `/any-url` would also respond!).
* [squash] Tweak per feedback.
cc @evans
This corrects the headings to be properly tiered/nested within each other, rather than having "2.0" at the same level as its features.
It also makes some slight wording changes, but more are to follow.
* docs: add note about passing context as a function
We realized today (by mistake) that the value of `context` in `GraphQLOptions` can be a function. Adding a note to the docs so it doesn't surprise anyone else.
* docs: update context as a function docs
- fix description per @n1ru4l's feedback
- add a code example of instantiating a new class in the context for each request
* remove formatParams
* remove formatParams from documentation
* check for valid query string after persisted query mapping
* fix sentence about different logging and label extensions as experimental
* mark graphql-extensions as more experimental
* Add a wider diversity of `gui` options
Although I know we want to remain less tied to the GraphQL Playground
GUI options, we definitely want to support a wider variety of options to
be passed in. This adds support for specifying partial options either
statically or dynamically for the gui, which can be extended to allow
for a wider array of guis than only GraphQL playground.
* Add boolean option and configuration for tabs
* move gui setting into ApolloServer Constructor
* document playground configuration in the constructor
* update playground types and fixed micro + koa integrations
* change gui to playground
* docs: change gui to playground
* fix logic for playground creation
* add cors option to apollo-server's constructor
* docs: add cors option to costructor for apollo-server
* expose CorsOptions from vanilla and express integrations
* Update apollo-server.md