Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-react

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-react - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

12

changelog.md
# 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 @@

7

lib/preload.js

@@ -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)&lt;[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)&lt;[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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc