Skip to content

Commit

Permalink
Merge branch 'master' into bug/apollographqlGH-3030/no-cache-undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranayub authored Mar 16, 2018
2 parents 0fd8663 + a4548b0 commit 7bf2e4d
Show file tree
Hide file tree
Showing 35 changed files with 614 additions and 221 deletions.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
If you don't follow the template, your issue may end up being closed without anyone looking at it carefully, because it is not actionable for us without the information in this template.
If you're filing a feature request, you do not need to follow the outline below, but please include "feature idea" in the title and include a specific example in which that feature would be useful.
If you're filing a feature request, you do not need to follow the template, but please mark the feature box at the bottom and include a specific example in which that feature would be useful.
-->

**Intended outcome:**
Expand Down Expand Up @@ -34,8 +34,9 @@ While not necessary, you can help organize our issues by labeling this issue whe
- [ ] has-reproduction
- [ ] feature
- [ ] docs
- [ ] blocking
- [ ] good first issue
To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
-->
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
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:
- [ ] has-reproduction
- [ ] feature
- [ ] blocking
- [ ] good first review
- [ ] docs
To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_multiconfig.yml
97 changes: 11 additions & 86 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
github_repo: apollographql/apollo-client
title: Apollo Client
propertytitle: Using GraphQL with Apollo Client
subtitle: React Guide
description: A guide to using the Apollo GraphQL Client with React.
author:
language:
timezone:
versions:
- '1'

content_root: docs/source
public_dir: public/docs/react

url: https://www.apollographql.com/docs/react
root: /docs/react/

typescript_api_box:
data_file: docs.json

# This setting also defines the page order used to generate the Previous/Next links at the bottom of each page
sidebar_categories:
# Basics
Expand Down Expand Up @@ -51,81 +53,4 @@ sidebar_categories:
- recipes/meteor
- recipes/recompose
Reference:
- reference/index


github_repo: apollographql/apollo-client
content_root: docs/source

social_links:
github: 'https://github.com/apollographql'
twitter: '@apollographql'
slackInvitePage: 'https://www.apollodata.com/#slack'

typescript_api_box:
data_file: docs.json

# API keys
apis:
segment: wgrIo8Bul0Ujl8USETG3DB6hONdy4kTg
gtm: GTM-PNFDVBB

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://www.apollographql.com/docs/react
root: /docs/react/
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public/docs/react
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: true
tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: http://hexo.io/plugins/
## Themes: http://hexo.io/themes/
theme: meteor

# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type:
- reference/index
39 changes: 24 additions & 15 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,35 @@
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.4.3"
"version": "3.6.0"
},
"dependencies": {
"hexo": "3.4.4",
"hexo-generator-archive": "^0.1.2",
"hexo-generator-category": "^0.1.2",
"hexo-generator-index": "^0.2.0",
"hexo-generator-tag": "^0.2.0",
"hexo-renderer-ejs": "^0.3.0",
"hexo-renderer-less": "^0.2.0",
"hexo-renderer-marked": "^0.3.0",
"hexo-server": "^0.3.0",
"devDependencies": {
"apollo-hexo-config": "^1.0.2",
"chexo": "^1.0.4",
"hexo": "3.6.0",
"hexo-generator-archive": "0.1.5",
"hexo-generator-category": "0.1.3",
"hexo-generator-index": "0.2.1",
"hexo-generator-tag": "0.2.0",
"hexo-renderer-ejs": "0.3.1",
"hexo-renderer-less": "0.2.0",
"hexo-renderer-marked": "0.3.2",
"hexo-server": "0.3.1",
"hexo-typescript-api-box": "^0.9.1",
"meteor-theme-hexo": "^1.0.1",
"typedoc": "^0.9.0",
"typescript": "^2.5.3"
},
"scripts": {
"types":
"cd ../packages/apollo-client && typedoc --json ../../docs/docs.json --ignoreCompilerErrors ./src/index.ts",
"build": "npm run types && hexo generate",
"start": "hexo serve"
"start": "npm run build && chexo apollo-hexo-config -- server",
"types": "cd ../packages/apollo-client && typedoc --json ../../docs/docs.json --ignoreCompilerErrors ./src/index.ts",
"build": "npm run types && chexo apollo-hexo-config -- generate",
"clean": "hexo clean",
"test": "npm run clean; npm run build"
},
"renovate": {
"extends": [
"apollo-docs"
]
}
}
2 changes: 1 addition & 1 deletion docs/source/features/cache-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export class Foo extends Component {
constructor(props) {
super(props);
this.unsubscribe = props.client.onResetStore(
() => this.setState({ reset: false }
() => this.setState({ reset: false })
);
this.state = { reset: false };
}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ app.use(cors(corsOptions));
```
## Header

Another common way to identify yourself when using HTTP is to send along an authorization header. Apollo Links make creating middlewares that lets you modify requests before they are sent to the server. It's easy to add an `authorization` header to every HTTP request. In this example, we'll pull the login token from `localStorage` every time a request is sent:
Another common way to identify yourself when using HTTP is to send along an authorization header. Apollo Links allow to create middlewares that let you modify requests before they are sent to the server. It's easy to add an `authorization` header to every HTTP request. In this example, we'll pull the login token from `localStorage` every time a request is sent:

```js
import { ApolloClient } from 'apollo-client';
Expand Down
1 change: 0 additions & 1 deletion docs/themes/meteor
Submodule meteor deleted from 99b04f
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@
"lerna": "2.9.0",
"lint-staged": "6.1.0",
"pre-commit": "1.2.2",
"prettier": "1.10.2",
"prettier": "1.11.1",
"rollup-plugin-local-resolve": "^1.0.7",
"rollup-plugin-node-resolve": "^3.0.3",
"rollup-plugin-sourcemaps": "^0.4.2",
"ts-jest": "20.0.14",
"typescript": "2.5.2"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/apollo-boost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import { ApolloProvider } from 'react-apollo';
// Pass your GraphQL endpoint to uri
const client = new ApolloClient({ uri: 'https://nx9zvp49q7.lp.gql.zone/graphql' });

const ApolloApp = () => (
const ApolloApp = AppComponent => (
<ApolloProvider client={client}>
<App />
<AppComponent />
</ApolloProvider>
);

render(ApolloApp, document.getElementById('root'));
render(ApolloApp(App), document.getElementById('root'));
```

Awesome! Your ApolloClient is now connected to your app. Let's create our `<App />` component and make our first query:
Expand Down
8 changes: 4 additions & 4 deletions packages/apollo-boost/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-boost",
"version": "0.1.2",
"version": "0.1.3",
"description": "The easiest way to get started with Apollo Client",
"author": "Peggy Rayzis <[email protected]>",
"contributors": [
Expand Down Expand Up @@ -33,8 +33,8 @@
"filesize": "npm run build && npm run build:browser"
},
"dependencies": {
"apollo-cache-inmemory": "^1.1.10",
"apollo-client": "^2.2.6",
"apollo-cache-inmemory": "^1.1.11",
"apollo-client": "^2.2.7",
"apollo-link": "^1.0.6",
"apollo-link-error": "^1.0.3",
"apollo-link-http": "^1.3.1",
Expand All @@ -44,7 +44,7 @@
"devDependencies": {
"@types/graphql": "0.12.4",
"@types/jest": "21.1.10",
"apollo-cache": "^1.1.5",
"apollo-cache": "^1.1.6",
"browserify": "15.2.0",
"graphql": "0.13.1",
"jest": "20.0.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/apollo-cache-inmemory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-cache-inmemory",
"version": "1.1.10",
"version": "1.1.11",
"description": "Core abstract of Caching layer for Apollo Client",
"author": "James Baxley <[email protected]>",
"contributors": [
Expand Down Expand Up @@ -38,9 +38,9 @@
"filesize": "npm run build:browser"
},
"dependencies": {
"apollo-cache": "^1.1.5",
"apollo-utilities": "^1.0.9",
"graphql-anywhere": "^4.1.6"
"apollo-cache": "^1.1.6",
"apollo-utilities": "^1.0.10",
"graphql-anywhere": "^4.1.7"
},
"peerDependencies": {
"graphql": "0.11.7 || ^0.12.0 || ^0.13.0"
Expand Down
16 changes: 7 additions & 9 deletions packages/apollo-cache-inmemory/src/__tests__/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ import { InMemoryCache, ApolloReducerConfig, NormalizedCache } from '..';
disableFragmentWarnings();

describe('Cache', () => {
function createCache(
{
initialState,
config,
}: {
initialState?: any;
config?: ApolloReducerConfig;
} = {},
): ApolloCache<NormalizedCache> {
function createCache({
initialState,
config,
}: {
initialState?: any;
config?: ApolloReducerConfig;
} = {}): ApolloCache<NormalizedCache> {
return new InMemoryCache(
config || { addTypename: false },
// XXX this is the old format. The tests need to be updated but since it is mapped down
Expand Down
1 change: 1 addition & 0 deletions packages/apollo-cache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

### vNext
- Improve code coverage
- Map coverage to original source

### 1.1.3
Expand Down
6 changes: 3 additions & 3 deletions packages/apollo-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-cache",
"version": "1.1.5",
"version": "1.1.6",
"description": "Core abstract of Caching layer for Apollo Client",
"author": "James Baxley <[email protected]>",
"contributors": [
Expand Down Expand Up @@ -38,7 +38,7 @@
"filesize": "npm run build && npm run build:browser"
},
"dependencies": {
"apollo-utilities": "^1.0.9"
"apollo-utilities": "^1.0.10"
},
"devDependencies": {
"@types/graphql": "0.12.4",
Expand All @@ -49,7 +49,7 @@
"jest": "20.0.4",
"rimraf": "2.6.2",
"rollup": "0.56.4",
"rollup-plugin-node-resolve": "3.0.2",
"rollup-plugin-node-resolve": "3.2.0",
"ts-jest": "20.0.14",
"tslint": "5.9.1",
"typescript": "2.5.2",
Expand Down
9 changes: 3 additions & 6 deletions packages/apollo-cache/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import resolve from 'rollup-plugin-node-resolve';

import build from '../../rollup.config';

export default Object.assign(
{
plugins: [resolve()],
},
build('apollo.cache.core'),
);
export default build('apollo.cache.core', {
plugins: [resolve()],
});
Loading

0 comments on commit 7bf2e4d

Please sign in to comment.