Commit graph

168 commits

Author SHA1 Message Date
Michael Watson
6c87cbc291 Correct name of Azure implementation to match original name. (#1926) 2018-11-06 13:46:33 -08:00
Leonid Buneev
5b64cf9160 apollo-server-azure-function v2 implementation. (#1753)
Closes #1752.
2018-11-06 11:28:25 -08:00
Tomáš Szabo
abbe382785 Make mocking configuration less confusing. (#1835)
* Make mocking configuration less confusing.
Setting mocks to false will always disable mocking.

* Updated CHANGELOG
2018-10-30 09:14:12 -07:00
Andre Eberhardt
b640be4fe6 feature(apollo-engine-reporting): Add custom http agent support (#1879)
This PR fixes #1836.

This PR enables developers to inject the http agent to be used on the network requests to apollo engine endpoint.

<!--
  Thanks for filing a pull request on GraphQL Server!

  Please look at the following checklist to ensure that your PR
  can be accepted quickly:
-->

TODO:

* [x] Update CHANGELOG.md with your change (include reference to issue & this PR)
* [x] Make sure all of the significant new logic is covered by tests
* [x] Rebase your changes on master so that they can be merged easily
* [x] Make sure all tests and linter rules pass

<!--**Pull Request Labels**

While not necessary, you can help organize our pull requests by labeling this issue when you open it.  To add a label automatically, simply [x] mark the appropriate box below:

- [ ] feature
- [ ] blocking
- [ ] docs

To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
2018-10-26 20:14:18 +03:00
Jesse Rosenberger
517264d579 Update to GraphQL Playground 1.7.8.
In addition to updating the `@apollographql/graphql-playground-html` fork,
which is necessary to avoid bundling `graphql-config` which had been
problematic in serverless environments, this updates the version number
which is served from the CDN.

I've just published `@apollographql/graphql-playground-html@1.6.4`.

Ref: https://github.com/apollographql/apollo-server/issues/1746
Ref: https://github.com/apollographql/graphql-playground/pull/2
Ref: https://github.com/apollographql/graphql-playground/pull/1

Thanks for @javlund for kicking off some of this work!
2018-10-26 20:02:04 +03:00
Jan Hartmann
458bc71ead Enables parsing of application/hal+json as JSON in RESTDataSource (#1853) 2018-10-26 05:14:00 +02:00
Jesse Rosenberger
d68f518d03
Remove CHANGELOG.md note regarding versioning. (#1704)
Since we’ve moved to independent versioning the statement about every package within this repository being at the same version is no longer true.  While we’ll need to improve our `CHANGELOG.md` story a bit to account for this, it’s best that we remove this statement to avoid confusing library consumers.
2018-09-26 11:56:18 +03:00
Jesse Rosenberger
6117cf9b71
docs: Remove note about releasing apollo-server-hapi16.
We do not intend on releasing an `apollo-server-hapi16`.  For more information on running Hapi v16 with Apollo Server 1.x, please check this section of the Apollo Server v1 documentation: https://www.apollographql.com/docs/apollo-server/v1/servers/hapi.html#Hapi-16

Closes #937.
2018-09-24 13:41:02 +03:00
Jesse Rosenberger
d934e7220d
docs: Fix CHANGELOG.md headings for 2.0.0 beta/rc releases. 2018-09-24 13:38:31 +03:00
Tim Griesser
4175f1b9cd Allow an optional function to resolve the rootValue (#1555)
* Allow an optional function to resolve the rootValue

Passes the parsed DocumentNode AST to determine the root value,
useful when providing a different rootValue for query vs mutation

* Add API docs for rootValue
2018-09-20 11:47:40 -07:00
Jesse Rosenberger
749538daee
Specify explicit cursorShape default for Playground options. (#1607)
* Specify explicit `cursorShape` to avoid missing cursor in GraphQL Playground.

This solves a problem with the text cursor caret not being visible in the
operation input box within GraphQL Playground by explicitly setting a
GraphQL Playground configuration option called `cursorShape` to `line`.

All credit for the actual solution goes to @lpellegr for their discovery in
https://github.com/prisma/graphql-playground/issues/790#issuecomment-409221277

* Update CHANGELOG.md
2018-09-20 17:12:11 +03:00
Jesse Rosenberger
6d6c9ff268
Make it more clear that generateClientInfo is an experimental API.
The `generateClientInfo` API, used to set client identification attributes
within traces, is an experimental API and is subject to removal or change in
a future (major) Apollo Server release.

Ref: #1631
2018-09-20 12:11:56 +03:00
Evans Hauser
e29e31b6dd
Update changelog 2018-09-18 14:35:15 -07:00
Marcel Miranda Ackerman
e949ab6a72 Updated Google Cloud Function request handler to handle null or undefined req.path (#1674)
* Updated request handler to handle null or undefined req.path

* Added test for GCF handling request.path being null

* Updated Changelog

* Add note about checking for null path
2018-09-18 14:04:01 -07:00
Jake Dawkins
f3df370b0a Fix header misreporting to engine (#1689)
* fix header reporting being cut short

* added changelog entry & fix npm version
2018-09-18 13:29:54 -07:00
Evans Hauser
96af44e41a
Provide ability to specify client info in traces (#1631)
* Provide ability to specify client info in traces

Adds the createClientInfo to apollo-engine-reporting, which enables the
differentiation of clients based on the request, operation, and
variables. This could be extended to include the response. However for
the first release. It doesn't quite make sense.

* Use extensions and context in createClientInfo

* Remove support for clientAddress

The frontend will not support it in the near future

* create -> generate and make default generator

createClientInfo -> generateClientInfo

* Clarify default values
2018-09-17 22:45:34 -07:00
Tim Roberts
d9590eeb5f Fix example link (#1682)
This PR adds a link to the `this example` link that was missing a URL.
2018-09-17 14:40:38 -07:00
Evans Hauser
8acedb7e2e
update changelog for release 2018-09-14 10:34:21 -07:00
C.J. Winslow
408198e5ac Pass the context request and response extension methods (#1547)
* Pass the context along to all the extension methods

Addresses #1343 

With this change you should now be able to implement an extension like so:

```javascript
class MyErrorTrackingExtension extends GraphQLExtension {
    willSendResponse(o) {
        const { context, graphqlResponse } = o

        context.trackErrors(graphqlResponse.errors)

        return o
    }
}
```

Edit by @evans :
fixes #1343
fixes #614 as the request object can be taken from context or from requestDidStart
fixes #631 ""

* Remove context from extra extension functions

The context shouldn't be necessary for format, parse, validation, and
execute. Format generally outputs the state of the extension. Parse and
validate don't depend on the context. Execution includes the context
argument as contextValue

* Move change entry under vNext
2018-09-07 18:10:30 -07:00
Martijn Walraven
c31d2e5747 Update CHANGELOG.md 2018-09-05 17:26:49 +02:00
Dries Vandermeulen
4ab7bb3f1a Fix apolo-server-micro top level error response (#1619)
Fixes #1581.
2018-09-05 16:03:04 +02:00
Vincenzo Russo
88417b7398 Switch ApolloServerBase.schema from private access to protected access (#1610) 2018-09-05 16:02:06 +02:00
Evans Hauser
4a409766a5 Add toggle for including error messages in reports (#1615)
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.
2018-09-05 16:01:14 +02:00
Marcel Miranda Ackerman
1348933d33 Fix Google Cloud Functions tests (#1616)
Closes #1601.
2018-09-05 15:54:42 +02:00
Shinya Ohira
6c44631657 Add node-fetch extensions typing (#1602) 2018-09-02 11:53:53 +02:00
Martijn Walraven
49d4ffb682 Augment typeDefs with cacheControl directive so SDL validation doesn't fail 2018-09-02 11:50:09 +02:00
Yipeng Zhao
984c47d07a Use playground default settings when possible (#1516)
Playground can either use external settings or its default settings (browser settings), in incompatible ways. The original implementation of default settings here would always provide 'settings' for Playground, in turn make its own settings mechanism disabled, with consequences such as altering settings in-browser cannot work as expect. Besides, once the default settings here go different with Playground provided, it would cause other problems.

The intention here is to use Playground setting as default, while explicit passing Playground settings in Apollo server would still work with defaults defined here merged.
2018-09-01 09:50:10 +02:00
Rob Richard
8d519c0550 Update changelog 2018-09-01 09:34:38 +02:00
Evans Hauser
2657e9b25b
Publish
- apollo-server-cloud-functions@2.0.1
 - apollo-server-cloudflare@2.0.2
 - apollo-server-core@2.0.4
 - apollo-server-express@2.0.4
 - apollo-server-hapi@2.0.4
 - apollo-server-integration-testsuite@2.0.4
 - apollo-server-koa@2.0.4
 - apollo-server-lambda@2.0.4
 - apollo-server-micro@2.0.4
 - apollo-server@2.0.5
2018-08-20 14:17:37 -07:00
Marcel Miranda Ackerman
724d9ff07d Implementation of Apollo Server 2 for Google Cloud Functions (#1446)
* Initial implementation of Apollo Server 2 for gcf

* First try at running with tests

* Updated naming

* Removed lambda mentions

* Simply use referer

* Updated README

* Updated Changelog

* Renamed gqlApollo to googleCloudApollo

* Added more details

* Removed extra check
2018-08-20 06:35:23 -04:00
Evans Hauser
ee7202efaf
update changelog to include bad build explaination 2018-08-16 15:20:11 -07:00
Evans Hauser
3e54e60ced
Publish
- apollo-server-cloudflare@2.0.1
 - apollo-server-core@2.0.3
 - apollo-server-express@2.0.3
 - apollo-server-hapi@2.0.3
 - apollo-server-integration-testsuite@2.0.3
 - apollo-server-koa@2.0.3
 - apollo-server-lambda@2.0.3
 - apollo-server-micro@2.0.3
 - apollo-server@2.0.3
2018-08-16 11:40:49 -07:00
Curtis Layne
0f17f7c50e Pass payload into the context function for subscriptions (#1513)
* Pass payload into the context function for subscriptions

The payload can be used for things like auth. You can pass a token on
the payload of the message and use it to fetch the user.

* Update CHANGELOG.md
2018-08-16 11:26:39 -07:00
Evans Hauser
efc5302930
Add option to mock the entire schema(i.e. set preserveResolvers) (#1546)
* add mockEntireSchema as configuration for preserveResolvers

* add mockEntireSchema to api reference

* add changelog
2018-08-16 11:21:13 -07:00
Evans Hauser
f7b5d63d03
Publish
- apollo-cache-control@0.2.2
 - apollo-datasource-rest@0.1.3
 - apollo-datasource@0.1.2
 - apollo-engine-reporting-protobuf@0.0.1
 - apollo-engine-reporting@0.0.2
 - apollo-server-cache-memcached@0.1.2
 - apollo-server-cache-redis@0.1.2
 - apollo-server-caching@0.1.2
 - apollo-server-cloudflare@2.0.0-rc.14
 - apollo-server-core@2.0.2
 - apollo-server-env@2.0.2
 - apollo-server-errors@2.0.2
 - apollo-server-express@2.0.2
 - apollo-server-hapi@2.0.2
 - apollo-server-integration-testsuite@2.0.2
 - apollo-server-koa@2.0.2
 - apollo-server-lambda@2.0.2
 - apollo-server-micro@2.0.2
 - apollo-server@2.0.2
 - apollo-tracing@0.2.2
 - graphql-extensions@0.1.2
2018-08-14 11:49:10 -07:00
Evans Hauser
ef82add05b
Publish
- apollo-cache-control@0.2.1
 - apollo-datasource-rest@0.1.2
 - apollo-datasource@0.1.1
 - apollo-engine-reporting-protobuf@0.0.0
 - apollo-engine-reporting@0.0.1
 - apollo-server-cache-memcached@0.1.1
 - apollo-server-cache-redis@0.1.1
 - apollo-server-caching@0.1.1
 - apollo-server-cloudflare@2.0.0-rc.13
 - apollo-server-core@2.0.1
 - apollo-server-env@2.0.1
 - apollo-server-errors@2.0.1
 - apollo-server-express@2.0.1
 - apollo-server-hapi@2.0.1
 - apollo-server-integration-testsuite@2.0.1
 - apollo-server-koa@2.0.1
 - apollo-server-lambda@2.0.1
 - apollo-server-micro@2.0.1
 - apollo-server@2.0.1
 - apollo-tracing@0.2.1
 - graphql-extensions@0.1.1
2018-08-14 11:05:31 -07:00
Jim (_nderscore)
412be208c1 Fixed GraphQL Playground with custom configuration in production. (#1495)
* Fixed support for GraphQL Playground with custom configuration in production environments.

* Updated logic in `createPlaygroundOptions` to cast the `playground` option to a boolean
  if it is defined. Fall back to `isDev` logic only if undefined.
* Updated unit test for partial graphql playground options to emulate a 'production'
  environment, mimicking the scenario that was broken before.

* Add PR #1495 to CHANGELOG.

* Restore partial playground options test when no `NODE_ENV`
2018-08-14 10:43:52 -07:00
Robin van der Vleuten
989481fea8 Allow additional Hapi route options to be passed (#1384)
* Allow additional route options to be passed

* Updated changelog with PR
2018-08-14 10:26:13 -07:00
Sashko Stubailo
8ca7380347 Look in event.path first when selecting endpoint for GraphQL Playground on Lambda, and check for null (#1527)
* Look in event.path first, and check for null

See here: https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-api-gateway-request

* Add to changelog
2018-08-13 15:58:23 -04:00
Cedric TESNIERE
d6eca9729f docs: fix typo in CHANGELOG (#1478) 2018-08-06 15:38:36 -07:00
Wout Mertens
11abffb8ce express, koa: don't continue past playground render (#1436)
* server-express: don't continue past playground

* koa: remove extra next call after playground

* update changelog with remove next
2018-07-27 17:13:23 -07:00
Max Nachlinger
0b76e9ef00 Hapi: Pass toolkit to context function (#1407)
* Fix for #1382

* fix typo in changelog

* Added a few tests proving the response toolkit is passed into the context function
2018-07-27 16:49:55 -07:00
Evans Hauser
37d20cfe66
Import engine reporting protobuf and fix reporting readme (#1429)
* Initial revision

* Ensure dist directory exists

* Add envrc for direnv users.

* protobufjs is a runtime dependency

* 0.0.0-beta.2

* update reports.proto with FullTracesReport

* 0.0.0-beta.3

* depend on @types/long

* 0.0.0-beta.4

* instead, do not use long

* 0.0.0-beta.5

* Add Details.variablesJson

* 0.0.0-beta.6

* comment-only update to new field

* 0.0.0-beta.7

* update a-e-reporting readme to reflect production ready state

* update changelog the engine reporting

* reporting-protobuf: prepare -> prepublish
2018-07-26 17:39:11 -07:00
David Baumgold
2cf6617dbb Consistent lists in CHANGELOG.md (#1418)
Because VS Code likes to auto-format files
2018-07-25 15:39:22 +02:00
Evans Hauser
b9f8216e5f
update changelog to include rc 8-10 2018-07-17 15:43:10 -07:00
Evans Hauser
c800071afa
update changelog for RC's and betas 2018-07-13 17:22:16 -07:00
Evans Hauser
170f072f96
bring version-2 up to date 2018-07-13 13:14:19 -07:00
Tejas Kumar
7dc280df32 Fix Typo resovers -> resolvers (#1233)
* Fix Typo resovers -> resolvers

* Fix typo migh -> might

* Fix typo resover -> resolver again
2018-06-22 15:53:02 -07:00
Seth Madison
8072312b99
bump version of subscriptions-transport-ws for graphiql
The newer subscription client has a more forgiving default ka timeout
2018-05-11 15:54:24 -07:00
Evans Hauser
e58db229df
changelogs: added to root and apollo-server-core 2018-05-11 15:54:20 -07:00