* 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
* enable willSendResponse to return a modified response
* add formatError as an extension that wraps engine reporting
* ensure that formatError once on every error path
* move old formatError express tests into integration suite
* add error lifecycle with minimal engine reporting check
* increase granularity of formatError test
* return 400 error for GraphQL error created by context
* add check for internal server error for errors thrown in context
* comment about context error status code
* Export polyfills and types separately
* More imports from apollo-server-env
* Initial commit
* Add .npmignore to avoid ignoring lib when publishing
* 0.0.2
* Reorganize code and clean up GraphQLExtension interface
* 0.0.3
* Add support for timing callbacks and add GraphQLExtensionStack
* 0.0.4
* Downgrade target in tsconfig.json from es2015 to es5
* 0.0.5
* Bump `graphql` peerDependency. (#3)
* 0.0.6
* Update dependencies
* 0.0.7
* whenResultIsFinished fix for array results (#4)
* 0.0.8
* [apollo-bot] Update the Issue/PR Templates with auto label (#6)
* Bump `graphql` peerDependency. (#7)
* Update `graphql` peer dependency range to allow 0.13.x. (#8)
* Update `devDependencies` to latest versions. (#9)
* dev: Update TypeScript to latest version, v2.7.2.
* dev: Update `graphql` to latest version, v0.13.2.
* dev: Update jest & dependencies to latest versions.
* dev: Update type definitions for `graphql`, `node` and `jest`.
* Allow `undefined` return values to `GraphQLExtension`'s `format()`. (#10)
In some cases, it's conceivable that the `format()` method may need to abort
its decision to provide extension information at runtime, in the event that
it doesn't have the proper information to return a full-result.
The `format` method already removed false-y results, so this simply changes
the types to allow the same.
* 0.0.9
* Fix lifecycle method invocations on extensions
* 0.0.10
* Add changelog
* Upgrade to TypeScript 2.8
Makes my editor integration happier (a bugfix in tsserver I think)
* Add tslint and prettier
Same configuration as apollo-engine-js
* Remove magic from GraphQLExtensionStack constructor
It's not hard to consistently pass in an actual extension object to this
low-level API.
* New extension API: didStart handlers return didEnd handlers
This is a backwards-incompatible change: GraphQLExtension implementations and
users of GraphQLExtensionStack (ie apollo-server-core) must change their
implementations, if they implement any of the xDidStart/xDidEnd APIs.
This allows "didEnd" handlers to refer to closure variables from the "didStart"
handler rather than needing to store state on the extension.
The new "didEnd" handlers run in the opposite order of the "didStart" handlers,
so that they properly nest.
* 0.1.0-beta.0
* Changelog
* Add magic back into GraphQLExtensionStack constructor
But now it actually gets more context (the execution arguments) and doesn't have
to be a constructor.
* 0.1.0-beta.1
* Export more types
* 0.1.0-beta.2
* Fix lifecycle handlers to pass proper "this"
* 0.1.0-beta.3
* Pass options directly to start handlers; eliminate factory again
* 0.1.0-beta.4
* error handling in didEnd
* 0.1.0-beta.5
* pass multiple errors to EndHandler
* 0.1.0-beta.6
* add willSendResponse
* 0.1.0-beta.7
* prettier
* setFieldResolver for custom fieldResolver
* reverse
* get more initial options into requestDidStart
* 0.1.0-beta.8
* 0.1.0-beta.9
* Actually, we already get the fieldResolver!
* 0.1.0-beta.10
* work without extensionStack
* 0.1.0-beta.11
* 0.1.0-beta.12
* Send errors to willResolveField callback
* 0.1.0-beta.13
* willSendResponse can return a result
* 0.1.0-beta.14
* Revert 1063be8..56912fc
This reverts commit 1063be8..56912fc.
* add PQ options to requestDidStart
* 0.1.0-beta.14
* 0.1.0-beta.15
* Initialize an empty TypeScript/Jest package
Template based on apollo-engine-js
* Basic trace node structure building
* basic timing
* Checkpoint towards signature implementation
The new signature implementation does not try to compress whitespace.
* Basic signature implementation
* progress towards actual reporting
* basic checkpoint for reporting
* 0.0.0-beta.1
* pull in @types/long, since it is in the external api
* 0.0.0-beta.2
* get rid of Long
* 0.0.0-beta.3
* debug log request what happened
* 0.0.0-beta.4
* 0.0.0-beta.5
* correct url
* 0.0.0-beta.6
* request headers
* 0.0.0-beta.7
* leave out a few headers
* 0.0.0-beta.8
* prettier
* move stuff into multiple files, and stop exporting the extension
* lots of doc comments
* address agent.ts XXX comments
* implement privateVariables
simplify API by removing flush() and allowing flush-ers to just call sendReport
directly
* privateHeaders and error tracking
* gzip, signals
* fix test
* 0.0.0-beta.9
* Error handling for reports
* 0.0.0-beta.10
* no need to include boring stacktrace
* 0.0.0-beta.11
* tweak error reporting
* 0.0.0-beta.12
* package-lock update (npm@6?)
* Reduce target report size to 512KB from 4MB.
Load testing revealed that protobuf encoding for large FullTraceReports could
tie up CPU and reduce p99 request latency (eg, to 200ms from 10ms). Reducing the
default target report size spreads out the encoding time and mitigates the
impact on latency. If this is not acceptable for all users, we may have to
investigate reintroducing agent-side stats aggregation to keep report sizes
small.
* 0.0.0-beta.13
* Encode Traces as they come in
This improves p99 times with little effect on p50 times. It also lets us get rid
of the heuristic average trace size estimation.
* 0.0.0-beta.14
* support PQ fields
* npm audit fix
* 0.0.0-beta.15
* ignore coverage
* Make the default signature more aggressive
We'd rather tell people confused by literal removal to tweak the signature than
tell people causing outages to do so.
* 0.0.0-beta.16
* Remove obsolete files from graphql-extensions and apollo-engine-reporting
* Fix dependencies and configs
* Fix apollo-server-cloudflare to import from apollo-server-env
* Fix compilation and test configs
* Get all tests passing again
* Switch to Lerna independent versioning
* Polyfill promisify for Node < 8 and load polyfills in tests
* ES2016 exponentiation operator is only supported in Node > 6
* add dependency cache for circle
* add missing env dependencies in REST datasource
It seems that hapi does not send all allowed origins in the
Access-Control-Allow-Origin header, so it is necessary to use another
configuration option to see if the config is being propagated
* core: return response object from runHttpQuery
* core: change gqlResponse to graphqlResponse and add custom RequestInit type
* core: add cache-control headers based on the calcualted maxAge
* core: add extensions check during cache-control header creation
* core: create headers when cacheControl is not enabled otherwise pass through extensions
* express: initial tests of CDN cach-contol headers
* core: fixed tests with applyMiddleware and pass cacheControl config
* core: cache hint fixes, ignore when no maxAge, and check for rootKeys
* core: check for hints of length 0
* core: node 10 fails file upload test for some stream reason
* docs: add cdn caching section to features
* add space after // in comments
* fix feedback: proxy alignment and response creation
Adds cache-control toggles for http header calculation and stripping out
the cache control extensions from the respose.
Brings the default calculation of headers in line with the proxy.
* fix links in comments
* fix tests with null dereference
* update cdn docs and migration guide to include latest cdn configuration
* add not for engine migration to set engine to false
* add engine set to false in migration guide
* express: fixed tests
* address feedback to use omit and documentation
* docs: cdn caching is alternative to full response caching
* add back epipe check in upload tests
ApolloServer builds in graphql-playground rather than graphiql, so we no longer
provide middleware for serving GraphiQL.
If this turns out to be an unpopular choice, we can always add support for
graphiql instead of graphql-playground back in later.
We prefer graphql-playground because it allows you to enter HTTP request
headers, view query history, and explicitly supports graphql@0.13.
Previously, we were planning to offer two kinds of APIs in "Apollo Server 2":
middleware functions just like in 1.0, and the new ApolloServer class. We have
not yet implemented ApolloServer for all of our supported web frameworks, so
this meant that the 2.0 version of modules such as apollo-server-koa (which does
not yet have an ApolloServer class) offered very little benefits over
apollo-server-koa@1.0 (as most of the benefits of 2.0 come from ApolloServer).
This is confusing. We are going to improve the current registerServer API so
that there's no real benefit to using a separately-exported middleware directly
rather than creating an ApolloServer and applying it to your web framework. So
the AS 2.0 API will just be ApolloServer. This means it doesn't make sense for
us to publish 2.x versions of the packages that don't yet support this API.
So this commit removes support for the following web frameworks: Adonis, Azure
Functions, Koa, Lambda, Micro, and Restify. (We leave in place Express, Hapi,
and Cloudflare workers.)
This isn't because we don't like these frameworks and don't want them to work
with Apollo Server 2.0! We would love to see each package resurrected and an
ApolloServer implementation built, either during this current 2.x beta phase or
after the official 2.0 release. Deleting these packages for now makes it more
clear which frameworks support 2.0 and which don't, rather than existing in a
state where apollo-server-express@2 has ApolloServer and apollo-server-koa@2
does not.
We recommend the use of apollo-engine-reporting and the other built-in features
of AS 2.0 rather than engineProxy. You can still use the apollo-engine npm
module manually with AS 2.0, or stay on AS 1.0.
* feat: ApolloServer is created and exported by all variants
* docs: add initial docs around exporting ApolloServer
* feat: export gql from integrations
* docs: change apollo-server examples to use express with registerServer
* server: remove registerExpressServer
* core, docs: comment functions, fix api reference, context creation more like middleware args
* docs: fix integrationed typo