-
Notifications
You must be signed in to change notification settings - Fork 2k
Comparing changes
Open a pull request
base repository: apollographql/apollo-server
base: apollo-server@2.9.12
head repository: apollographql/apollo-server
compare: apollo-server@2.14.2
Commits on Oct 8, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 5859a57 - Browse repository at this point
Copy the full SHA 5859a57View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbdf403 - Browse repository at this point
Copy the full SHA cbdf403View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23903a1 - Browse repository at this point
Copy the full SHA 23903a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9429eb - Browse repository at this point
Copy the full SHA a9429ebView commit details -
Implement the per-request manifest-presence test.
With this commit, the first functioning version of operation registry is in place. 🎉
Configuration menu - View commit details
-
Copy full SHA for 739dea6 - Browse repository at this point
Copy the full SHA 739dea6View commit details
Commits on Oct 9, 2018
-
remove private flag from operation-registry
James Baxley committedOct 9, 2018 Configuration menu - View commit details
-
Copy full SHA for 81b7542 - Browse repository at this point
Copy the full SHA 81b7542View commit details
Commits on Oct 11, 2018
-
Configuration menu - View commit details
-
Copy full SHA for df0604a - Browse repository at this point
Copy the full SHA df0604aView commit details -
Improve the error handling in the event of fetch failures.
In particular, the console will be more clear if it's unable to fetch the manifest on server startup and errors in the pulsing after the initial fetch will be logged until the next successful sync. Also cleans up some unnecessary catching which was only helpful during development.
Configuration menu - View commit details
-
Copy full SHA for e995846 - Browse repository at this point
Copy the full SHA e995846View commit details -
Enable the configurability of the
debug
boolean via constructor opt……ions. The plugin now accepts: ``` new ...({ debug: true }); ``` ...in order to see output about operations being added or removed from the known manifest.
Configuration menu - View commit details
-
Copy full SHA for 62584fd - Browse repository at this point
Copy the full SHA 62584fdView commit details
Commits on Oct 12, 2018
-
Configuration menu - View commit details
-
Copy full SHA for f7e8d2a - Browse repository at this point
Copy the full SHA f7e8d2aView commit details -
(tests) Introduce tests for the operation registry.
More to come, but something to start with.
Configuration menu - View commit details
-
Copy full SHA for 5e1ba74 - Browse repository at this point
Copy the full SHA 5e1ba74View commit details
Commits on Oct 15, 2018
-
Cleanup tests and file patterns.
In terms of not over-exposing and also in terms of not having a test named `index.test.js` (which somewhat implies that it will behave the same to an `index` file which has special meaning), I've moved the primary class into `ApolloServerPluginOperationRegistry.ts`, a file which matches the class's name and can be tested as `ApolloServerPluginOperationRegistry.test.ts`.
Configuration menu - View commit details
-
Copy full SHA for 49e8a3d - Browse repository at this point
Copy the full SHA 49e8a3dView commit details
Commits on Oct 16, 2018
-
(op-reg) Expose an async
requestPending
method which can beawait
ed.This is most helpful for testing since many elements of the manifest fetching, including the fetch itself, happen asynchronously and are otherwise difficult to test deterministically. Internally, this changes the `requestInFlight` from a Boolean to a Promise, though that's an implementation detail which should go unnoticed.
Configuration menu - View commit details
-
Copy full SHA for 7a09ec5 - Browse repository at this point
Copy the full SHA 7a09ec5View commit details -
(op-reg) Expose a
_timesChecked
property to assist with testing.Knowing, in the most primitive sense possible that the check has been attempted is useful for testing.
Configuration menu - View commit details
-
Copy full SHA for 2e993fe - Browse repository at this point
Copy the full SHA 2e993feView commit details -
(op-reg) Switch to Promise-aware loops, even if unnecessary right now.
In debugging, it was useful to occasionally `await` the cache operations. I don't believe that we should actually await the cache writes, though that's certainly debatable, but it seemed worth keeping the `for...of` loop, nonetheless.
Configuration menu - View commit details
-
Copy full SHA for b193188 - Browse repository at this point
Copy the full SHA b193188View commit details -
(op-reg) Generally improve operation registry tests, again!
This introduces a number of utility functions which should be useful for more advanced testing cases and also tests: * failed initial requests * operation purging
Configuration menu - View commit details
-
Copy full SHA for 111eb0b - Browse repository at this point
Copy the full SHA 111eb0bView commit details
Commits on Oct 22, 2018
-
(op-reg) Switch to the more common
pop
and add a comment.I could set the length to zero, but I'd rather not create a new array and stick to the `const`.
Configuration menu - View commit details
-
Copy full SHA for 6328f6d - Browse repository at this point
Copy the full SHA 6328f6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for acd56d7 - Browse repository at this point
Copy the full SHA acd56d7View commit details
Commits on Nov 6, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 85359fc - Browse repository at this point
Copy the full SHA 85359fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 310f3b7 - Browse repository at this point
Copy the full SHA 310f3b7View commit details -
Bump
apollo-server-plugin-operation-registry
to 2.2.0-alpha.3 prior…… to publishing.
Configuration menu - View commit details
-
Copy full SHA for 53f69b8 - Browse repository at this point
Copy the full SHA 53f69b8View commit details
Commits on Nov 7, 2018
-
Bump
apollo-server-plugin-operation-registry
to 2.2.0-alpha.4 prior…… to publishing.
Configuration menu - View commit details
-
Copy full SHA for 24ea7c2 - Browse repository at this point
Copy the full SHA 24ea7c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bb5128 - Browse repository at this point
Copy the full SHA 8bb5128View commit details
Commits on Dec 3, 2018
-
Configuration menu - View commit details
-
Copy full SHA for c67a233 - Browse repository at this point
Copy the full SHA c67a233View commit details
Commits on Jan 15, 2019
-
(opreg) Switch to
fast-json-stable-stringify
, same as #2065 / ccba8c8.I've switched this to the same library used by the main repository for consistency and licensing purposes. The local depdendency by the operation registry will actually go away in a future update now that it's supported by the core server implementation.
Configuration menu - View commit details
-
Copy full SHA for eff44a0 - Browse repository at this point
Copy the full SHA eff44a0View commit details
Commits on Jan 24, 2019
-
Configuration menu - View commit details
-
Copy full SHA for ce92dc4 - Browse repository at this point
Copy the full SHA ce92dc4View commit details -
(op-reg): Utilize
loglevel-debug
to implementDEBUG=
-like behavior.This way we will still be able to easily toggle the debugging on with an environment variable, much in the same way that the `DEBUG` environment variable behaves in the https://npm.im/debug module.
Configuration menu - View commit details
-
Copy full SHA for 857e7bd - Browse repository at this point
Copy the full SHA 857e7bdView commit details -
(op-reg): Introduce
hashForLogging
to prefix log msgs with the op. ……hash. The actual operation hash is quite long, so it's helpful to have a shortened version for logging purposes. 8 bytes worth should do the trick for _most_ intents and purposes.
Configuration menu - View commit details
-
Copy full SHA for 6dfaeb5 - Browse repository at this point
Copy the full SHA 6dfaeb5View commit details
Commits on Jan 25, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 8299284 - Browse repository at this point
Copy the full SHA 8299284View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92a01d2 - Browse repository at this point
Copy the full SHA 92a01d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b09a01a - Browse repository at this point
Copy the full SHA b09a01aView commit details -
(op-reg): Use our own in-memory store, rather than sharing the APQ ca…
…che. Allowing the APQ cache to be used is setting up users for failure since the APQ cache can be configured to be distributed. This is less than ideal since a portion of a distributed cache store might go offline rendering operations suddenly unable to be executed, despite being previously valid. Because of the turn over of the manifest checking, it could take a full pass in order to re-populate these, and even that would only happen if the manifest was actually changed (since we check the ETag).
Configuration menu - View commit details
-
Copy full SHA for e8ed40b - Browse repository at this point
Copy the full SHA e8ed40bView commit details -
(op-reg): Mandate storage be an
InMemoryLRUCache
, not any `KeyValue……Cache`. It's important that the operation registry utilize a store that's not subject to ejections, which some distributed cache stores might be. Therefore, this changes the typing requirements of the store to be an `InMemoryLRUCache`, which, when unconfigured, has no ejection configured — despite its name.
Configuration menu - View commit details
-
Copy full SHA for 29f1d51 - Browse repository at this point
Copy the full SHA 29f1d51View commit details -
Avoid re-parsing the query by using the
document
from the request p……ipeline. Its unfortunate this wasn't already in place, though part of the plugin-to-request-pipeline functionality may have crossed wires with the building of this plugin. Either way, this should be a performance win, _especially_ when used with the `documentStore` (which saves parsed/validated documents) which was introduced in the below-referenced PR. Ref: #2211
Configuration menu - View commit details
-
Copy full SHA for 2d660a9 - Browse repository at this point
Copy the full SHA 2d660a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30c0848 - Browse repository at this point
Copy the full SHA 30c0848View commit details -
(op-reg) Only forbid operations if
forbidUnregisteredOperations
is ……set. Prior to this commit, the mode this variable describes was the default operation for the operation registry plugin. That said, the documentation has already been suggesting that this be set in order to enable this behavior. Having the ability to toggle this behavior is certainly interesting and useful since it helps ease into a full operation manifest mode. While we intend on enabling functionality in Apollo Engine to help guide this transition, for now, the logging facilities (which are improved in recent commits) will allow users to observe the overall behavior of their server in terms of operation execution approval/denial.
Configuration menu - View commit details
-
Copy full SHA for 5eb3cf7 - Browse repository at this point
Copy the full SHA 5eb3cf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48d26ed - Browse repository at this point
Copy the full SHA 48d26edView commit details
Commits on Jan 28, 2019
-
Merge pull request #11 from apollographql/abernix/op-reg-forbid-unreg…
…istered op-reg: Only forbid operations if `forbidUnregisteredOperations` is set.
Configuration menu - View commit details
-
Copy full SHA for 9ec7d04 - Browse repository at this point
Copy the full SHA 9ec7d04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63e0aad - Browse repository at this point
Copy the full SHA 63e0aadView commit details -
(op-reg) Forbid operations when
forbidUnregisteredOperations
is ena……bled. This re-lands 956c8f02bc913afe355f40e9179041167a9b8267 which was a work-in-progress commit which added logging at the correct places, but stopped short of actual enforcement. Prior to this new functionality, unregistered operations were forbidden by default, even if the `forbidUnregisteredOperations` variable which this commit (now) implements was `true` or not. The documentation for the operation registry plugin has always stated that this parameter must be set in order to enable this behavior, so this shouldn't be interpreted as a breaking change - particularly since the previous behavior was an `alpha` release on a pre-1.x version. This commit makes the implementation more flexible by allowing incremental adoption of operation safe-listing since it allows the plugin to be installed and the enforcement operation to be observed via logging (immediately) and hopefully soon via Apollo Engine. Finally, for servers that need to selectively enable enforcement, the `forbidUnregisteredOperations` parameter accepts a predicate function which receives the request's `GraphQLRequestContext` as the first parameter. This will allow implementers to selectively disable the enforcement when, for example, a header is present that identifies the requester as a "super-user" (or other authorized user who is not subject to operation safe-listing). For example: ``` require("apollo-server-plugin-operation-registry")({ // De-structure the request context to get the `headers` map. forbidUnregisteredOperations({ request: { http: { headers } } }) { // If the magic header is in place, allow any unregistered operation. // Of course, additional validation is possible! if (headers.get('x-let-me-in')) { return false; } // Otherwise, enforce it. return true; } }) ```
Configuration menu - View commit details
-
Copy full SHA for 543f230 - Browse repository at this point
Copy the full SHA 543f230View commit details
Commits on Jan 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 3a948a8 - Browse repository at this point
Copy the full SHA 3a948a8View commit details -
op-reg: My own editorial on my own debug message.
For whatever reason, this sounds better to me now.
Configuration menu - View commit details
-
Copy full SHA for 3e856c6 - Browse repository at this point
Copy the full SHA 3e856c6View commit details -
Apply typing suggestions from @martijnwalraven's feedback.
I haven't been able to confirm whether this was a win or not though as I'm somewhat suspect that the typing was already inferred in other magical ways. Requesting help! :man-golfing:
Configuration menu - View commit details
-
Copy full SHA for 9d6b82a - Browse repository at this point
Copy the full SHA 9d6b82aView commit details
Commits on Jan 30, 2019
-
Revert "Apply typing suggestions from @martijnwalraven's feedback." (…
…for now). This reverts commit a4e88998636b7e5dd0c3301ea73d6a40016f109d, which we haven't been able to concretely prove has any positive typing benefit (both @martijnwalraven and I are a bit surprised). That said, we don't want to introduce additional typing complexities unnecessarily, but hopefully this commit will serve as an easy reversion (of the reversion!) target if we go in that direction.
Configuration menu - View commit details
-
Copy full SHA for 0831e69 - Browse repository at this point
Copy the full SHA 0831e69View commit details
Commits on Feb 12, 2019
-
Accommodate
apollo-server-plugin-operation-registry
with necessary ……tweaks. The `apollo-server-plugin-operation-registry` was previously a part of a monorepo which was a fork of the `apollo-server` repository which shared all the common packages of that repository, in addition to hosting its own `apollo-server-plugin-operation-registry` and the types which support that package. Its commit history has been preserved by virtue of a `git filter-branch` command, but since that monorepo's root `package.json` hosted the `devDependencies` (as is the setup we have with Lerna), and the root's `types/` directory hosted some hand-crafted typings, there are some additional `devDependencies` and `types` which have brought over from that repository manually to support `apollo-server-plugin-operation-registry`. Finally, the `tsconfig.json`s have been modified to avoid references to packages which are no longer a part of the shared repository and are instead relied on directly from npm.
Configuration menu - View commit details
-
Copy full SHA for 7e50c24 - Browse repository at this point
Copy the full SHA 7e50c24View commit details
Commits on Feb 15, 2019
-
Switch to
apollo-graphql
for providing the signature transformations.As of #2259, the signature normalization transformations no longer live in `apollo-engine-reporting`. They now live in `apollo-graphql` which allows us to drop a large portion of the dependency tree since `apollo-engine-reporting` currently depends on `apollo-server-core` for its type definitions. We'll use path-based imports at the moment because not everything is exported from the main module of `apollo-graphql` (intentionally).
Configuration menu - View commit details
-
Copy full SHA for 2046c11 - Browse repository at this point
Copy the full SHA 2046c11View commit details -
Update LICENSE.md for new
fast-json-stable-stringify
.As of #2065, we no longer use `json-stable-stringify`, which pulled in `jsonify` — a dependency which is licensed under a public-domain license which is not agreeable with some organizations. The `fast-json-stable-stringify` license does not rely on `jsonify`. This swaps the package being licensed, but the license itself is the same (MIT).
Configuration menu - View commit details
-
Copy full SHA for ecac482 - Browse repository at this point
Copy the full SHA ecac482View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d4b5d7 - Browse repository at this point
Copy the full SHA 4d4b5d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3f50bc - Browse repository at this point
Copy the full SHA f3f50bcView commit details -
Switch to non-exact versions of
dependencies
.Since these are no longer packages which are controlled under lerna's exact versioning, we don't need to be exact pinning these anymore. In fact, we should embrace the fact that these can be moved forward on their own!
Configuration menu - View commit details
-
Copy full SHA for a4a1921 - Browse repository at this point
Copy the full SHA a4a1921View commit details
There are no files selected for viewing