Commit graph

105 commits

Author SHA1 Message Date
Kornel Dubieniecki
c03fe79e33 Make gql example consistent and easier to read (#2087)
Hey guys,
I've noticed that some of the gql examples are indented differently than the rest and I think that consistent indentation and formatting makes it easier to read and comprehend.
Let me know what you think, thanks.
2018-12-13 15:55:04 +02:00
Pratik Nikam
54c56bfc64 Fix hyperlink for masking and logging errors. (#2032) 2018-11-29 09:08:34 +02:00
Jesse Rosenberger
034383f491
Consistently use parent, rather than root, as first resolver argument.
In an effort to maintain consistency and semantically correct meaning,
this changes (only in documentation and internal Apollo Server tests) the
name of the first argument in resolver signatures to use `parent` rather
than `root`.

While `root` certainly makes sense when the resolver is belonging to the
root `Query` or `Mutation` type, once nested field resolvers begin getting
called, the more semantically correct term would seem to be `parent`.

Since `parent` still makes sense at the root level, and since resolvers
frequently get copied and pasted into more deeply-nested positions, putting
this pattern in place for apps which are just beginning might just help
someone more clearly understand the relationship in the future — without
incorrectly thinking that a nested resolver is accessing the root of the
graph, rather than the parent.
2018-11-16 20:37:26 +02:00
Steve Suh
5abb65f186 Example code snippet does not work (#1735)
* Example code snippet does not work

for the context it needs to return a connection.context and not a {}.

* Include not about what connection contains
2018-11-16 13:33:02 +02:00
Peggy Rayzis
6f75a473ec Add schema design guide content to unions and interfaces 2018-11-14 20:27:13 -05:00
Peggy Rayzis
0ec58323e0 Add auth guide, rename testing guide 2018-11-14 20:25:38 -05:00
Prosper Otemuyiwa
d278d35c32
Revert "Add Authentication and File Uploads as guides and feature (#1956)" (#1957)
This reverts commit 61f2e47108.
2018-11-13 12:22:55 +01:00
Prosper Otemuyiwa
61f2e47108
Add Authentication and File Uploads as guides and feature (#1956)
* Add File uploads as a feature

* Add authentication to server as access-control
2018-11-13 12:09:18 +01:00
Evans Hauser
79e6a2ea42
Add client awareness reference api and some docs (#1927)
* Add client awareness reference api and some docs

* Reword and add default behavior to docs

* update clientReferenceId docs to be more explicit

* Update the generateClientInfo to use headers
2018-11-10 16:11:53 -08:00
Jake Dawkins
d07b4b7048 added apollo-server-testing docs (#1939)
These are docs to accompany the `apollo-server-testing` utils

<!--
  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:

* [ ] Update CHANGELOG.md with your change (include reference to issue & this PR)
* [ ] Make sure all of the significant new logic is covered by tests
* [ ] Rebase your changes on master so that they can be merged easily
* [ ] 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
- [x] docs

To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
2018-11-09 17:30:15 -08:00
Jake Dawkins
75b19b82f2
Clarified wording of mocking docs (#1901)
* clarified wording of mocking docs

* Update mocking.md
2018-11-01 18:27:50 -04:00
Espen Hovlandsdal
b2f677fb6e Fix typo in metrics documentation (#1856) 2018-10-25 11:07:21 +03:00
Nicolas Marien
94fc935d3c "Fix incorrect documentation for enum value" (#1802) 2018-10-11 16:36:31 +03:00
Dan Dascalescu
23ed96a6db More nuanced handling of stack traces in errors (#1708) 2018-10-10 17:22:10 +03: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
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
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
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
Zak Mandhro
34ece7552b Added description and sample code for enabling SSL 2018-09-01 09:41:13 +02: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
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
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
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
Evans Hauser
fbf6c6b226
update playground to include #1319 2018-07-13 10:43:38 -07:00
unicodeveloper
a31501ff66 DeleteD 2018-07-13 10:25:42 -07:00
Evans Hauser
990d915aec
Apollo Server 2: Remove formatParams (#1331)
* remove formatParams

* remove formatParams from documentation

* check for valid query string after persisted query mapping

* fix sentence about different logging and label extensions as experimental

* mark graphql-extensions as more experimental
2018-07-13 09:44:13 -07:00
Sasha Jolich
7f157da399 Fixed a couple typos (#1309) 2018-07-11 15:56:07 -07:00
Adam Zionts
11b867114e Move gui option into constructor and use playground (#1297)
* 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
2018-07-11 15:42:00 -07:00
Evans Hauser
f9373bf341
add graphql types referenced in creating-directives 2018-07-10 10:26:21 -07:00
Jesse Rosenberger
8ad31377d8
Follow-up editorial for GraphQL Playground doc. (#1270). 2018-07-09 08:54:08 -07:00
Evans Hauser
02d31559da
Add GraphQL Playground Documentation (#1270)
* add initial playground documentation

* link to playground in whats-new

* address feedback
2018-07-05 16:17:39 -07:00
Martijn Walraven
23965de8a1 Add example of intercepting fetches and resolving URLs to data source docs 2018-07-03 13:46:18 +02:00
Mordechai Zuber
dae5349d57 Clarify docs for hybrid connections with middleware (#1285) 2018-07-02 14:09:07 -07:00
unicodeveloper
9d326ff8ce Delete the files 2018-07-02 08:10:24 +01:00
Evans Hauser
80174d2197
Further improves subscriptions docs (#1263)
* docs: address feedback from #1255

* add alternative pubsub implementations and improve clarity
2018-06-29 10:42:24 -07:00
Evans Hauser
738a933e81
docs: add persited query cache configuration 2018-06-28 12:43:32 -07:00
Jesse Rosenberger
ea25edc776 docs: Use sentence case for title names. (#1258)
Ref: https://docs-docs.netlify.com/docs/docs/formatting.html#sentence-case
2018-06-27 10:01:40 -07:00
Evans Hauser
28cec7e92f
docs: Engine Reporting API and pass Engine API key in constructor (#1256)
- docs: add engine api and sync api key pass in with engine-docs
2018-06-27 10:00:49 -07:00
Evans Hauser
62ff5c6ce6
Improve Subscriptions Dev/Docs Experience (#1255)
* fix hapi playground version, a-s exports subscription url, and document subscriptions

* remove unused subscription lifecycle methods
2018-06-27 09:59:21 -07:00
Jake Dawkins
8c9eaf0774
Added other HTTP methods to DataSource Docs (#1254)
* add other http methods to docs

* added section headers
2018-06-27 09:45:14 -04:00
Jake
6f99c45e4e added slash to end of example base urls 2018-06-26 16:45:25 +02:00
Jake
6ccb79055f added constructors 2018-06-26 16:45:25 +02:00
Ben Iofel
b54402fb53 Update unions-interfaces.md (#1196) 2018-06-26 17:35:47 +03:00