Commit graph

2078 commits

Author SHA1 Message Date
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
Renovate Bot
4378b30861 chore(deps): update dependency hapi to v17.5.5 2018-09-24 09:44:46 +00:00
Renovate Bot
fe3466768b chore(deps): update dependency @types/node to v10.10.3 2018-09-22 14:00:33 +00:00
Hugh Willson
dd86fa8a29 Re-enable Typescript esModuleInterop (#1699)
`esModuleInterop` was enabled in
e4164c8892
to help with importing from packages that use default exports.
Those changes were reverted in
https://github.com/apollographql/apollo-server/pull/1210
to work around a few reported issues. Those issues are no longer
relevant, so this commit re-enables `esModuleInterop`, and
updates all default imports to use the more common (standard)
import syntax.
2018-09-21 16:43:33 +03:00
Renovate Bot
a88166887b chore(deps): update dependency @types/micro to v7.3.2 2018-09-21 04:54:19 +00:00
William Li
c0446dc4aa Incorrect description in docs for Mocks (#1692)
* Incorrect sample codes

```const { ApolloServer } = require('apollo-server');```
should be 
```const { ApolloServer, gql } = require('apollo-server');```

The functions in `mocks` would be used when no resolver in `resolvers` is specified only when `mockEntireSchema: false`.

* Update mocking.md

Change the documentation to be correct, indicating that the mocks overwrite the resolvers
2018-09-20 12:03:56 -07: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
Christoph Müller
3b21ade045 Update schema-stitching.md (#1561)
On version 3.1.1 there is an error ( `Error: Invalid schema passed` ) when wrapping the `linkTypeDefs` in `gql`. Passing the plain string the example works.
2018-09-20 17:19:49 +03:00
renovate[bot]
f2a4673006 chore(deps): update dependency graphql-tools to v4 (#1698) 2018-09-20 17:13:03 +03: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
Renovate Bot
b96dd59e78 chore(deps): update dependency @types/koa-router to v7.0.32 2018-09-20 11:59:39 +00:00
renovate[bot]
32b5e5dc26 chore(deps): update dependency yup to v0.26.6 (#1696)
<p>This Pull Request updates devDependency <code>yup</code> (<a href="https://renovatebot.com/gh/jquense/yup">source</a>) from <code>v0.26.5</code> to <code>v0.26.6</code></p>
<p><strong>Note</strong>: This PR was created on a configured schedule ("after 6pm every weekday,before 8am every weekday" in timezone <code>America/Los_Angeles</code>) and will not receive updates outside those times.</p>
<p><details><br />
<summary>Release Notes</summary></p>
<h3 id="v0266httpsgithubcomjquenseyupcomparev0265v0266"><a href="https://renovatebot.com/gh/jquense/yup/compare/v0.26.5…v0.26.6"><code>v0.26.6</code></a></h3>
<p><a href="https://renovatebot.com/gh/jquense/yup/compare/v0.26.5…v0.26.6">Compare Source</a></p>
<hr />
<p></details></p>
<hr />
<p>This PR has been generated by <a href="https://renovatebot.com">Renovate Bot</a>.</p>
2018-09-20 14:38:26 +03:00
renovate[bot]
b013f50d20 chore(deps): update dependency prettier to v1.14.3 (#1693) 2018-09-20 14:38:07 +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
Renovate Bot
1cd33c60dd chore(deps): update dependency subscriptions-transport-ws to v0.9.15 2018-09-19 05:42:38 +00:00
Evans Hauser
86dd95e223
Publish
- apollo-cache-control@0.2.5
 - apollo-engine-reporting@0.0.6
 - apollo-server-cloud-functions@2.1.0
 - apollo-server-cloudflare@2.1.0
 - apollo-server-core@2.1.0
 - apollo-server-express@2.1.0
 - apollo-server-hapi@2.1.0
 - apollo-server-integration-testsuite@2.1.0
 - apollo-server-koa@2.1.0
 - apollo-server-lambda@2.1.0
 - apollo-server-micro@2.1.0
 - apollo-server@2.1.0
 - apollo-tracing@0.2.5
 - graphql-extensions@0.2.1
2018-09-18 15:26:48 -07: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
Renovate Bot
6db5b7ae90 chore(deps): update dependency @types/node to v10.10.1 2018-09-18 13:57:51 +00: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
Kornel Dubieniecki
e2580a31de Fix type for a mutation example (#1635) 2018-09-17 16:44:35 -07:00
Kornel Dubieniecki
47e10fc3cf Add Non-Nullable type example (#1636) 2018-09-17 16:44:22 -07:00
Kornel Dubieniecki
e2ccc9c6ca Add express import in middleware apollo-server-express example (#1637) 2018-09-17 16:43:44 -07:00
ellord
39260da493 Small grammatical fix ("a" as opposed to "an") (#1655) 2018-09-17 16:43:04 -07:00
Rafael Almeida
83178c3915 Add exception on note regarding the removal of Upload scalar (#1658)
* Add exception on note regarding the removal of Upload scalar

* Update whats-new.md
2018-09-17 16:42:34 -07:00
Kornel Dubieniecki
047e848841 Add subscription type example (#1648) 2018-09-17 16:37:04 -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
Renovate Bot
8446ce412a chore(deps): update dependency apollo-link-http to v1.5.5 2018-09-17 13:09:38 +00:00
Renovate Bot
9489a222d7 chore(deps): update dependency @types/node to v10.10.0 2018-09-17 10:02:57 +00:00
Renovate Bot
99d735664e chore(deps): update dependency apollo-link to v1.2.3 2018-09-17 09:02:30 +00:00
Renovate Bot
717e7bc791 chore(deps): update dependency lerna to v3.4.0 2018-09-15 06:23:45 +00:00
Evans Hauser
5adae649e3
Publish
- apollo-cache-control@0.2.4
 - apollo-engine-reporting@0.0.5
 - apollo-server-cloud-functions@2.0.4
 - apollo-server-cloudflare@2.0.5
 - apollo-server-core@2.0.7
 - apollo-server-express@2.0.7
 - apollo-server-hapi@2.0.7
 - apollo-server-integration-testsuite@2.0.7
 - apollo-server-koa@2.0.7
 - apollo-server-lambda@2.0.7
 - apollo-server-micro@2.0.7
 - apollo-server@2.0.8
 - apollo-tracing@0.2.4
 - graphql-extensions@0.2.0
2018-09-14 10:35:33 -07:00
Evans Hauser
8acedb7e2e
update changelog for release 2018-09-14 10:34:21 -07:00
Evans Hauser
91afcc7aac
Merge pull request #1668 from nmchaves/fix-reporting-circ-reference
Catch Error if JSON.Stringify Fails for Engine Trace
2018-09-14 10:25:55 -07:00
Nico Chaves
c37f1911c5
Merge branch 'master' into fix-reporting-circ-reference 2018-09-14 09:14:24 -07:00
Michael Watson
4166098e24 update @depracated to use "reason" (#1665)
See original spec: http://facebook.github.io/graphql/draft/#sec--deprecated
2018-09-14 09:43:22 +03:00
Renovate Bot
b42980da40 chore(deps): update dependency @types/aws-lambda to v8.10.13 2018-09-14 06:00:52 +00:00
nmchaves
e7823e8fc4 catch error if JSON.stringify fails for trace variables 2018-09-13 21:47:35 -07:00
nmchaves
7ac5a17e03 fix tslint errors (shadowed variable names) 2018-09-13 21:29:19 -07:00
Renovate Bot
520f910672 chore(deps): update dependency lerna to v3.3.2 2018-09-13 03:34:41 +00:00
Renovate Bot
e49e17295f chore(deps): update dependency lerna to v3.3.1 2018-09-12 09:08:49 +00:00
Renovate Bot
953bc452c9 chore(deps): update dependency yup to v0.26.5 2018-09-12 06:22:09 +00:00
Renovate Bot
3d3f155006 chore(deps): update dependency koa to v2.5.3 2018-09-12 04:07:48 +00:00
Renovate Bot
5687b33d66 chore(deps): update dependency jest-matcher-utils to v23.6.0 2018-09-10 17:10:31 +00:00
Renovate Bot
a44610c801 chore(deps): update dependency jest to v23.6.0 2018-09-10 15:32:22 +00:00
Renovate Bot
0d438a746f chore(deps): update dependency @types/jest to v23.3.2 2018-09-08 04:16:36 +00: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
Renovate Bot
8875022a4c chore(deps): update dependency supertest to v3.3.0 2018-09-07 05:28:18 +00:00