Commit graph

458 commits

Author SHA1 Message Date
Martin d'Allens
e7296b79aa Docs: fix the example for "Using an Existing Schema" (#1761)
* Fix the example for "Using an Existing Schema"

The file caused the following error:
```
const gql = String.raw;
      ^
SyntaxError: Identifier 'gql' has already been declared
```

* Update migration-two-dot.md

* Update migration-two-dot.md
2018-10-10 16:57:18 +03:00
Miguel Dorta
a61413a190 Fix typo (#1745) 2018-10-02 09:29:17 +02:00
Loc Nguyen
32db56169c Use gql tag in typeDef examples that were missing it. Also fix a type in a require statement. (#1756) 2018-10-02 09:28:37 +02:00
Jake Dawkins
673a580660 docs: Make schema directive example clearer (#1715)
The schema directive example [here](https://www.apollographql.com/docs/apollo-server/v2/features/directives.html) doesn't work. The package being imported was meant to be an _example_, unworking directive. This is confusing for people trying to run this example, so I replaced it with a real one.
2018-09-24 20:34:46 +03: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
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
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
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
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
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
Ryan Maxwell
b349b43a2f Fix typo in performance scaling paragraph (#1605) 2018-09-05 15:57:09 +02:00
Zak Mandhro
34ece7552b Added description and sample code for enabling SSL 2018-09-01 09:41:13 +02:00
xAKLx
27d65a1d6a Fix "To be successful" line 2018-09-01 09:25:30 +02:00
Renovate Bot
e848353814
chore(deps): update dependency hexo-server to v0.3.3 2018-08-28 09:25:12 +00:00
Jesse Rosenberger
d38ee1cf7d
Add the package-lock.json file for the docs/ sub-dir for reproducibility.
The documentation deployment will be less prone to transitive dependency
changes by introducing a `package-lock.json` file.
2018-08-28 12:08:13 +03: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
Dimitri Nicolas
25f568b391 Typo in doc "Migrating to v2.0" (#1538) 2018-08-16 08:48:14 -07:00
Jonas Hackenberg
9225426360 Add disabled introspection info (#1480)
Add info about disabled introspection in production
2018-08-14 10:29:04 -07:00
Evans Hauser
598a7732ab
Migration docs for schema as object (#1368)
* add migration docs for schema as object

* address feedback
2018-08-14 10:26:52 -07:00
Clayton Ray
5b8acaa048 Update migration-two-dot.md (#1491) 2018-08-14 10:19:10 -07:00
Jesse Rosenberger
46e3beea6d
docs: Remove rc dist-tag designation from apollo-datasource-rest instruction. (#1497)
It is no longer necessary to use the `rc` tag when installing `apollo-datasource-rest`.
2018-08-07 15:39:22 +03:00
Jake Dawkins
3178d81c45 Updated Deployment Guides (#1430)
* updated lambda deployment guide

* updated heroku deployment guide

* updated now docs

* address PR reviews

* fix now docs
2018-08-07 08:40:08 +01:00
Jesse Rosenberger
85b97b6f0c docs: Correct path for GraphQL Playground. (#1427)
* 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
2018-07-30 15:49:25 -07:00
Prosper Otemuyiwa
e514cdfd4c
Cleanup subscriptions link (#1437)
* Remove graphql-subscriptions link from the sidebar

* Add graphql-subscriptions docs link under Subscriptions Feature
2018-07-27 16:47:34 +02:00
Mohamed Nimir
a700a3350b Fixed Wrong Header at unions-interfaces (#1425)
Fixed header at L#78 from `Intersection` to `Interface`
2018-07-26 14:15:58 -07:00
Martin Eboh
4f28b14745 Fix typo in scalars-enums.md (#1432)
Fixed a typo!
2018-07-26 14:14:40 -07:00
Martin Eboh
ff22b0210a Fix typo in subscriptions.md (#1431)
Fixed a typo!
2018-07-26 14:14:03 -07:00
Sam Horton
16cd16d91a clarify typedefs API (#1389)
Add more accurate type information and example of using `typeDefs` in the `ApolloServer` constructor.
2018-07-25 22:40:32 +02:00
Jesse Rosenberger
e9ed926052
docs: Remove leftover Git merge conflict delineation.
Fixes my bad from daf6ffefa1.
2018-07-19 15:17:07 -07:00
Jesse Rosenberger
daf6ffefa1
docs: Fix link to "GraphQL Playground" in "What's new?" guide. 2018-07-19 15:01:11 -07:00
Jesse Rosenberger
67e047887f
docs: fix link to "Fetching data with resolvers.". 2018-07-19 15:00:24 -07:00
Jesse Rosenberger
3ce81e2c00
docs: Fix link to makeExecutableSchema. 2018-07-19 15:00:24 -07:00
Jesse Rosenberger
820908ce77
docs: Remove intro paragraph about the "What's new?" page.
I don't think we need to explain what the "What's new" page is about in so many words.
2018-07-19 14:50:54 -07:00
Jesse Rosenberger
a4b6114bbb
docs: Move the instructions for migrating into the 2.0 section.
Most eyes will go to this section, so it seems best to include these important instructions there.
2018-07-19 14:45:35 -07:00
Jesse Rosenberger
836654d6ca
docs: Correct the structure of the whats-new.md.
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.
2018-07-19 14:24:44 -07:00
Jesse Rosenberger
4dda3b7140
docs: Remove reference to rc (release candidate) dist-tag.
Apollo Server 2.0 is now officially released and published to the `latest` tag!
2018-07-19 14:04:45 -07:00
Prosper Otemuyiwa
ca35b9fe1c Docs: Remove all RC references in Apollo Server 2 documentation (#1377)
* Remove rc from getting-started

* Remove rc from migration engine

* Remove RC references from migration 2 dot

* Remove rc references

* Remove RC references and correct spellings

* Remove RC references from Essentials

* Remove all RC references
2018-07-19 12:44:02 -07:00
Jesse Rosenberger
b3c80f3b2e
docs: Hyphenate "in-memory". 2018-07-19 10:52:58 -07:00
Jesse Rosenberger
c94116e9a6
docs: Fix various links in the Apollo Server 2 documentation. (#1375)
Many of these links have changed as a result of page shuffling on other
repositories, such as the Engine documentation.
2018-07-19 10:52:07 -07:00
Martijn Walraven
08bede84ac Rename apollo-server-redis and apollo-server-memcached 2018-07-18 18:30:09 -07:00
Dan Dascalescu
e37f4beafa Mocking: fix typo 2018-07-18 06:24:02 -07:00