graphql-react
Advanced tools
Comparing version 6.0.0 to 6.0.1
# graphql-react changelog | ||
## 6.0.1 | ||
### Patch | ||
- Updated dev dependencies. | ||
- Removed the [`watch`](https://npm.im/watch) dev dependency and `watch` package script. | ||
- `preload` now properly catches render errors nested under `Query` components. | ||
- `preload` now supports class components that don’t call their base constructor with `props`, fixing [#17](https://github.com/jaydenseric/graphql-react/issues/17). | ||
- Fixed a prop type warning in one of the tests. | ||
- Fixed example code typos in the readme “Usage” section. | ||
- Fixed incorrect `graphQLErrors` JSDoc type. | ||
## 6.0.0 | ||
@@ -4,0 +16,0 @@ |
@@ -14,3 +14,3 @@ 'use strict' | ||
var preload = function preload(element) { | ||
return new Promise(function(resolve) { | ||
return new Promise(function(resolve, reject) { | ||
var recursePreload = function recursePreload( | ||
@@ -71,2 +71,3 @@ rootElement, | ||
var instance = new element.type(props, legacyContext) | ||
instance.props = instance.props || props | ||
instance.state = instance.state || null | ||
@@ -122,3 +123,5 @@ | ||
recursePreload(element).then(resolve) | ||
recursePreload(element) | ||
.then(resolve) | ||
.catch(reject) | ||
}) | ||
@@ -125,0 +128,0 @@ } |
{ | ||
"name": "graphql-react", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "A lightweight GraphQL client for React.", | ||
@@ -60,13 +60,13 @@ "license": "MIT", | ||
"cross-fetch": "^3.0.0", | ||
"eslint": "^5.11.1", | ||
"eslint": "^5.12.0", | ||
"eslint-config-env": "^2.0.0", | ||
"eslint-config-prettier": "^3.3.0", | ||
"eslint-config-prettier": "^3.4.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-import-order-alphabetical": "^0.0.1", | ||
"eslint-plugin-node": "^8.0.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"eslint-plugin-react": "^7.11.1", | ||
"eslint-plugin-node": "^8.0.1", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"eslint-plugin-react": "^7.12.3", | ||
"graphql": "^14.0.2", | ||
"graphql-api-koa": "^2.0.0", | ||
"husky": "^1.3.0", | ||
"husky": "^1.3.1", | ||
"jsdoc-md": "^1.7.0", | ||
@@ -80,4 +80,3 @@ "koa": "^2.6.2", | ||
"size-limit": "^0.21.1", | ||
"tap": "^12.1.1", | ||
"watch": "^1.0.2" | ||
"tap": "^12.1.1" | ||
}, | ||
@@ -98,4 +97,3 @@ "scripts": { | ||
"test:lib:js": "node lib/test | tap-mocha-reporter spec", | ||
"prepublishOnly": "npm run prepare && npm test", | ||
"watch": "watch 'npm run prepublishOnly --silent' src --interval 1" | ||
"prepublishOnly": "npm run prepare && npm test" | ||
}, | ||
@@ -102,0 +100,0 @@ "husky": { |
@@ -87,5 +87,5 @@ ![graphql-react logo](https://cdn.jsdelivr.net/gh/jaydenseric/graphql-react@0.1.0/graphql-react-logo.svg) | ||
<figure> | ||
<img src={data.image} alt={name} /> | ||
<img src={data.pokemon.image} alt={name} /> | ||
<figcaption> | ||
Pokémon #{data.number}: {name} | ||
Pokémon #{data.pokemon.number}: {name} | ||
</figcaption> | ||
@@ -503,11 +503,11 @@ </figure> | ||
| Parameter | Type | Description | | ||
| :-------------- | :---------------------------------- | :----------------------------------------- | | ||
| `load` | [function](https://mdn.io/function) | Loads the query on demand, updating cache. | | ||
| `loading` | [boolean](https://mdn.io/boolean) | Is the query loading. | | ||
| `fetchError` | [string](https://mdn.io/string)? | Fetch error message. | | ||
| `httpError` | [HttpError](#type-httperror)? | Fetch response HTTP error. | | ||
| `parseError` | [string](https://mdn.io/string)? | Parse error message. | | ||
| `graphQLErrors` | [Object](https://mdn.io/object)? | GraphQL response errors. | | ||
| `data` | [Object](https://mdn.io/object)? | GraphQL response data. | | ||
| Parameter | Type | Description | | ||
| :-------------- | :----------------------------------------------------------------- | :----------------------------------------- | | ||
| `load` | [function](https://mdn.io/function) | Loads the query on demand, updating cache. | | ||
| `loading` | [boolean](https://mdn.io/boolean) | Is the query loading. | | ||
| `fetchError` | [string](https://mdn.io/string)? | Fetch error message. | | ||
| `httpError` | [HttpError](#type-httperror)? | Fetch response HTTP error. | | ||
| `parseError` | [string](https://mdn.io/string)? | Parse error message. | | ||
| `graphQLErrors` | [Array](https://mdn.io/array)<[Object](https://mdn.io/object)>? | GraphQL response errors. | | ||
| `data` | [Object](https://mdn.io/object)? | GraphQL response data. | | ||
@@ -547,8 +547,8 @@ **Returns:** ReactElement — React virtual DOM element. | ||
| Property | Type | Description | | ||
| :-------------- | :------------------------------- | :------------------------- | | ||
| `fetchError` | [string](https://mdn.io/string)? | Fetch error message. | | ||
| `httpError` | [HttpError](#type-httperror)? | Fetch response HTTP error. | | ||
| `parseError` | [string](https://mdn.io/string)? | Parse error message. | | ||
| `graphQLErrors` | [Object](https://mdn.io/object)? | GraphQL response errors. | | ||
| `data` | [Object](https://mdn.io/object)? | GraphQL response data. | | ||
| Property | Type | Description | | ||
| :-------------- | :----------------------------------------------------------------- | :------------------------- | | ||
| `fetchError` | [string](https://mdn.io/string)? | Fetch error message. | | ||
| `httpError` | [HttpError](#type-httperror)? | Fetch response HTTP error. | | ||
| `parseError` | [string](https://mdn.io/string)? | Parse error message. | | ||
| `graphQLErrors` | [Array](https://mdn.io/array)<[Object](https://mdn.io/object)>? | GraphQL response errors. | | ||
| `data` | [Object](https://mdn.io/object)? | GraphQL response data. | |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70551
31
882