graphql-react
Advanced tools
Comparing version 15.0.0 to 16.0.0
125
package.json
{ | ||
"name": "graphql-react", | ||
"version": "15.0.0", | ||
"version": "16.0.0", | ||
"description": "A GraphQL client for React using modern context and hooks APIs that’s lightweight (< 4 kB) but powerful; the first Relay and Apollo alternative with server side rendering.", | ||
@@ -30,20 +30,70 @@ "license": "MIT", | ||
"files": [ | ||
"private", | ||
"public" | ||
"Cache.mjs", | ||
"CacheContext.mjs", | ||
"HYDRATION_TIME_MS.mjs", | ||
"HydrationTimeStampContext.mjs", | ||
"Loading.mjs", | ||
"LoadingCacheValue.mjs", | ||
"LoadingContext.mjs", | ||
"Provider.mjs", | ||
"cacheDelete.mjs", | ||
"cacheEntryDelete.mjs", | ||
"cacheEntryPrune.mjs", | ||
"cacheEntrySet.mjs", | ||
"cacheEntryStale.mjs", | ||
"cachePrune.mjs", | ||
"cacheStale.mjs", | ||
"fetchGraphQL.mjs", | ||
"fetchOptionsGraphQL.mjs", | ||
"useAutoAbortLoad.mjs", | ||
"useAutoLoad.mjs", | ||
"useCache.mjs", | ||
"useCacheEntry.mjs", | ||
"useCacheEntryPrunePrevention.mjs", | ||
"useForceUpdate.mjs", | ||
"useLoadGraphQL.mjs", | ||
"useLoadOnDelete.mjs", | ||
"useLoadOnMount.mjs", | ||
"useLoadOnStale.mjs", | ||
"useLoading.mjs", | ||
"useLoadingEntry.mjs", | ||
"useWaterfallLoad.mjs" | ||
], | ||
"sideEffects": false, | ||
"main": "public", | ||
"exports": { | ||
".": { | ||
"import": "./public/index.mjs", | ||
"require": "./public/index.js" | ||
}, | ||
"./public/*": "./public/*", | ||
"./package": "./package.json", | ||
"./package.json": "./package.json" | ||
"./package.json": "./package.json", | ||
"./Cache.mjs": "./Cache.mjs", | ||
"./CacheContext.mjs": "./CacheContext.mjs", | ||
"./HYDRATION_TIME_MS.mjs": "./HYDRATION_TIME_MS.mjs", | ||
"./HydrationTimeStampContext.mjs": "./HydrationTimeStampContext.mjs", | ||
"./Loading.mjs": "./Loading.mjs", | ||
"./LoadingCacheValue.mjs": "./LoadingCacheValue.mjs", | ||
"./LoadingContext.mjs": "./LoadingContext.mjs", | ||
"./Provider.mjs": "./Provider.mjs", | ||
"./cacheDelete.mjs": "./cacheDelete.mjs", | ||
"./cacheEntryDelete.mjs": "./cacheEntryDelete.mjs", | ||
"./cacheEntryPrune.mjs": "./cacheEntryPrune.mjs", | ||
"./cacheEntrySet.mjs": "./cacheEntrySet.mjs", | ||
"./cacheEntryStale.mjs": "./cacheEntryStale.mjs", | ||
"./cachePrune.mjs": "./cachePrune.mjs", | ||
"./cacheStale.mjs": "./cacheStale.mjs", | ||
"./fetchGraphQL.mjs": "./fetchGraphQL.mjs", | ||
"./fetchOptionsGraphQL.mjs": "./fetchOptionsGraphQL.mjs", | ||
"./useAutoAbortLoad.mjs": "./useAutoAbortLoad.mjs", | ||
"./useAutoLoad.mjs": "./useAutoLoad.mjs", | ||
"./useCache.mjs": "./useCache.mjs", | ||
"./useCacheEntry.mjs": "./useCacheEntry.mjs", | ||
"./useCacheEntryPrunePrevention.mjs": "./useCacheEntryPrunePrevention.mjs", | ||
"./useLoadGraphQL.mjs": "./useLoadGraphQL.mjs", | ||
"./useLoadOnDelete.mjs": "./useLoadOnDelete.mjs", | ||
"./useLoadOnMount.mjs": "./useLoadOnMount.mjs", | ||
"./useLoadOnStale.mjs": "./useLoadOnStale.mjs", | ||
"./useLoading.mjs": "./useLoading.mjs", | ||
"./useLoadingEntry.mjs": "./useLoadingEntry.mjs", | ||
"./useWaterfallLoad.mjs": "./useWaterfallLoad.mjs" | ||
}, | ||
"engines": { | ||
"node": "^12.20 || >= 14.13" | ||
"node": "^12.22.0 || ^14.17.0 || >= 16.0.0" | ||
}, | ||
"browserslist": "Node 12.20 - 13 and Node < 13, Node >= 14.13, > 0.5%, not OperaMini all, not IE > 0, not dead", | ||
"browserslist": "Node 12.22 - 13 and Node < 13, Node 14.17 - 15 and Node < 15, Node >= 16, > 0.5%, not OperaMini all, not IE > 0, not dead", | ||
"peerDependencies": { | ||
@@ -55,27 +105,26 @@ "react": "16.14 - 17", | ||
"extract-files": "^11.0.0", | ||
"isobject": "^4.0.0", | ||
"react-waterfall-render": "^2.0.0" | ||
"react-waterfall-render": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/react-hooks": "^7.0.0", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"abort-controller": "^3.0.0", | ||
"coverage-node": "^5.0.1", | ||
"esbuild": "^0.12.8", | ||
"eslint": "^7.28.0", | ||
"eslint-config-env": "^20.0.1", | ||
"esbuild": "^0.14.0", | ||
"eslint": "^8.3.0", | ||
"eslint-config-env": "^23.0.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-compat": "^3.9.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-jsdoc": "^35.1.3", | ||
"eslint-plugin-compat": "^4.0.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jsdoc": "^37.0.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.27.1", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"event-target-shim": "^6.0.2", | ||
"filter-console": "^0.1.1", | ||
"formdata-node": "^3.5.3", | ||
"gzip-size": "^6.0.0", | ||
"jsdoc-md": "^11.0.0", | ||
"node-fetch": "^3.0.0-beta.9", | ||
"prettier": "^2.3.1", | ||
"filter-console": "^1.0.0", | ||
"formdata-node": "^4.3.1", | ||
"gzip-size": "^7.0.0", | ||
"jsdoc-md": "^11.0.2", | ||
"node-fetch": "^3.1.0", | ||
"prettier": "^2.5.0", | ||
"react": "^17.0.2", | ||
@@ -85,13 +134,13 @@ "react-dom": "^17.0.2", | ||
"revertable-globals": "^2.0.0", | ||
"test-director": "^6.0.0" | ||
"test-director": "^7.0.0" | ||
}, | ||
"scripts": { | ||
"jsdoc": "jsdoc-md", | ||
"test": "npm run test:eslint && npm run test:prettier && npm run test:jsdoc && npm run test:api", | ||
"test:eslint": "eslint --ext mjs,js .", | ||
"test:prettier": "prettier -c .", | ||
"test:jsdoc": "jsdoc-md -c", | ||
"test:api": "coverage-node test/index.mjs", | ||
"docs-update": "jsdoc-md", | ||
"docs-check": "jsdoc-md -c", | ||
"eslint": "eslint .", | ||
"prettier": "prettier -c .", | ||
"tests": "coverage-node test.mjs", | ||
"test": "npm run eslint && npm run prettier && npm run docs-check && npm run tests", | ||
"prepublishOnly": "npm test" | ||
} | ||
} |
571
readme.md
@@ -11,10 +11,10 @@ ![graphql-react logo](https://cdn.jsdelivr.net/gh/jaydenseric/graphql-react@0.1.0/graphql-react-logo.svg) | ||
- [Setup](#setup) | ||
- [Installation](#installation) | ||
- [Examples](#examples) | ||
- [Support](#support) | ||
- [Requirements](#requirements) | ||
- [API](#api) | ||
## Setup | ||
## Installation | ||
First, polyfill any required globals (see [_**Support**_](#support)) that are missing in your server and client environments. | ||
First, polyfill any required globals (see [_**Requirements**_](#requirements)) that are missing in your server and client environments. | ||
@@ -45,9 +45,7 @@ ### Next.js setup | ||
```jsx | ||
// While named imports are available, deep imports result in a small bundle size | ||
// regardless of the (often dubious) tree-shaking abilities of your bundler. | ||
import useAutoLoad from 'graphql-react/public/useAutoLoad.js'; | ||
import useCacheEntry from 'graphql-react/public/useCacheEntry.js'; | ||
import useLoadGraphQL from 'graphql-react/public/useLoadGraphQL.js'; | ||
import useWaterfallLoad from 'graphql-react/public/useWaterfallLoad.js'; | ||
import { useCallback } from 'react'; | ||
import useAutoLoad from "graphql-react/useAutoLoad.mjs"; | ||
import useCacheEntry from "graphql-react/useCacheEntry.mjs"; | ||
import useLoadGraphQL from "graphql-react/useLoadGraphQL.mjs"; | ||
import useWaterfallLoad from "graphql-react/useWaterfallLoad.mjs"; | ||
import React from "react"; | ||
@@ -78,3 +76,3 @@ // The query is just a string; no need to use `gql` from `graphql-tag`. The | ||
const load = useCallback( | ||
const load = React.useCallback( | ||
() => | ||
@@ -86,9 +84,9 @@ // To be DRY, utilize a custom hook for each API your app loads from, e.g. | ||
// Fetch URI. | ||
'https://api.github.com/graphql', | ||
"https://api.github.com/graphql", | ||
// Fetch options. | ||
{ | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Accept: 'application/json', | ||
"Content-Type": "application/json", | ||
Accept: "application/json", | ||
Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`, | ||
@@ -131,13 +129,13 @@ }, | ||
// server/client HTML mismatch error. | ||
'Error!' | ||
"Error!" | ||
: cacheValue.data.repo.stargazers.totalCount | ||
: // In this situation no cache value implies loading. Use the | ||
// `useLoadingEntry` hook to manage loading in detail. | ||
'Loading…'; | ||
"Loading…"; | ||
} | ||
``` | ||
## Support | ||
## Requirements | ||
- [Node.js](https://nodejs.org): `^12.20 || >= 14.13` | ||
- [Node.js](https://nodejs.org): `^12.22.0 || ^14.17.0 || >= 16.0.0` | ||
- [Browsers](https://npm.im/browserslist): `> 0.5%, not OperaMini all, not IE > 0, not dead` | ||
@@ -219,22 +217,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { Cache } from 'graphql-react'; | ||
> import Cache from "graphql-react/Cache.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import Cache from 'graphql-react/public/Cache.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { Cache } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const Cache = require('graphql-react/public/Cache.js'); | ||
> ``` | ||
_Construct a new instance._ | ||
@@ -289,22 +273,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { Loading } from 'graphql-react'; | ||
> import Loading from "graphql-react/Loading.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import Loading from 'graphql-react/public/Loading.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { Loading } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const Loading = require('graphql-react/public/Loading.js'); | ||
> ``` | ||
_Construct a new instance._ | ||
@@ -356,3 +326,3 @@ | ||
| `loadingResult` | Promise<[CacheValue](#type-cachevalue)> | Resolves the loading result (including any loading errors) to be set as the [cache value](#type-cachevalue) if loading isn’t aborted. Shouldn’t reject. | | ||
| `abortController` | AbortController | Aborts this loading and skips setting the loading result as the [cache value](#type-cachevalue). Has no affect after loading ends. | | ||
| `abortController` | AbortController | Aborts this loading and skips setting the loading result as the [cache value](#type-cachevalue). Has no effect after loading ends. | | ||
@@ -367,25 +337,11 @@ #### Fires | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { LoadingCacheValue } from 'graphql-react'; | ||
> import LoadingCacheValue from "graphql-react/LoadingCacheValue.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import LoadingCacheValue from 'graphql-react/public/LoadingCacheValue.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { LoadingCacheValue } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const LoadingCacheValue = require('graphql-react/public/LoadingCacheValue.js'); | ||
> ``` | ||
#### LoadingCacheValue instance property abortController | ||
Aborts this loading and skips setting the loading result as the [cache value](#type-cachevalue). Has no affect after loading ends. | ||
Aborts this loading and skips setting the loading result as the [cache value](#type-cachevalue). Has no effect after loading ends. | ||
@@ -423,22 +379,8 @@ **Type:** AbortController | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cacheDelete } from 'graphql-react'; | ||
> import cacheDelete from "graphql-react/cacheDelete.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cacheDelete from 'graphql-react/public/cacheDelete.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cacheDelete } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cacheDelete = require('graphql-react/public/cacheDelete.js'); | ||
> ``` | ||
--- | ||
@@ -461,22 +403,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cacheEntryDelete } from 'graphql-react'; | ||
> import cacheEntryDelete from "graphql-react/cacheEntryDelete.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cacheEntryDelete from 'graphql-react/public/cacheEntryDelete.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cacheEntryDelete } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cacheEntryDelete = require('graphql-react/public/cacheEntryDelete.js'); | ||
> ``` | ||
--- | ||
@@ -500,22 +428,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cacheEntryPrune } from 'graphql-react'; | ||
> import cacheEntryPrune from "graphql-react/cacheEntryPrune.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cacheEntryPrune from 'graphql-react/public/cacheEntryPrune.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cacheEntryPrune } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cacheEntryPrune = require('graphql-react/public/cacheEntryPrune.js'); | ||
> ``` | ||
--- | ||
@@ -539,22 +453,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cacheEntrySet } from 'graphql-react'; | ||
> import cacheEntrySet from "graphql-react/cacheEntrySet.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cacheEntrySet from 'graphql-react/public/cacheEntrySet.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cacheEntrySet } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cacheEntrySet = require('graphql-react/public/cacheEntrySet.js'); | ||
> ``` | ||
--- | ||
@@ -577,22 +477,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cacheEntryStale } from 'graphql-react'; | ||
> import cacheEntryStale from "graphql-react/cacheEntryStale.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cacheEntryStale from 'graphql-react/public/cacheEntryStale.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cacheEntryStale } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cacheEntryStale = require('graphql-react/public/cacheEntryStale.js'); | ||
> ``` | ||
--- | ||
@@ -616,22 +502,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cachePrune } from 'graphql-react'; | ||
> import cachePrune from "graphql-react/cachePrune.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cachePrune from 'graphql-react/public/cachePrune.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cachePrune } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cachePrune = require('graphql-react/public/cachePrune.js'); | ||
> ``` | ||
--- | ||
@@ -654,22 +526,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { cacheStale } from 'graphql-react'; | ||
> import cacheStale from "graphql-react/cacheStale.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import cacheStale from 'graphql-react/public/cacheStale.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { cacheStale } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const cacheStale = require('graphql-react/public/cacheStale.js'); | ||
> ``` | ||
--- | ||
@@ -697,22 +555,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { fetchGraphQL } from 'graphql-react'; | ||
> import fetchGraphQL from "graphql-react/fetchGraphQL.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import fetchGraphQL from 'graphql-react/public/fetchGraphQL.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { fetchGraphQL } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const fetchGraphQL = require('graphql-react/public/fetchGraphQL.js'); | ||
> ``` | ||
--- | ||
@@ -734,22 +578,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { fetchOptionsGraphQL } from 'graphql-react'; | ||
> import fetchOptionsGraphQL from "graphql-react/fetchOptionsGraphQL.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import fetchOptionsGraphQL from 'graphql-react/public/fetchOptionsGraphQL.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { fetchOptionsGraphQL } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const fetchOptionsGraphQL = require('graphql-react/public/fetchOptionsGraphQL.js'); | ||
> ``` | ||
--- | ||
@@ -775,27 +605,14 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { Provider } from 'graphql-react'; | ||
> import Provider from "graphql-react/Provider.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import Provider from 'graphql-react/public/Provider.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { Provider } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const Provider = require('graphql-react/public/Provider.js'); | ||
> ``` | ||
_Provide a [`Cache`](#class-cache) instance for an app._ | ||
> ```jsx | ||
> import { Cache, Provider } from 'graphql-react'; | ||
> import React from 'react'; | ||
> import Cache from "graphql-react/Cache.mjs"; | ||
> import Provider from "graphql-react/Provider.mjs"; | ||
> import React from "react"; | ||
> | ||
@@ -821,22 +638,8 @@ > const cache = new Cache(); | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useAutoAbortLoad } from 'graphql-react'; | ||
> import useAutoAbortLoad from "graphql-react/useAutoAbortLoad.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useAutoAbortLoad from 'graphql-react/public/useAutoAbortLoad.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useAutoAbortLoad } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useAutoAbortLoad = require('graphql-react/public/useAutoAbortLoad.js'); | ||
> ``` | ||
--- | ||
@@ -866,22 +669,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useAutoLoad } from 'graphql-react'; | ||
> import useAutoLoad from "graphql-react/useAutoLoad.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useAutoLoad from 'graphql-react/public/useAutoLoad.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useAutoLoad } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useAutoLoad = require('graphql-react/public/useAutoLoad.js'); | ||
> ``` | ||
--- | ||
@@ -897,22 +686,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useCache } from 'graphql-react'; | ||
> import useCache from "graphql-react/useCache.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useCache from 'graphql-react/public/useCache.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useCache } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useCache = require('graphql-react/public/useCache.js'); | ||
> ``` | ||
--- | ||
@@ -932,22 +707,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useCacheEntry } from 'graphql-react'; | ||
> import useCacheEntry from "graphql-react/useCacheEntry.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useCacheEntry from 'graphql-react/public/useCacheEntry.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useCacheEntry } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useCacheEntry = require('graphql-react/public/useCacheEntry.js'); | ||
> ``` | ||
--- | ||
@@ -965,22 +726,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useCacheEntryPrunePrevention } from 'graphql-react'; | ||
> import useCacheEntryPrunePrevention from "graphql-react/useCacheEntryPrunePrevention.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useCacheEntryPrunePrevention from 'graphql-react/public/useCacheEntryPrunePrevention.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useCacheEntryPrunePrevention } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useCacheEntryPrunePrevention = require('graphql-react/public/useCacheEntryPrunePrevention.js'); | ||
> ``` | ||
--- | ||
@@ -996,22 +743,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useLoadGraphQL } from 'graphql-react'; | ||
> import useLoadGraphQL from "graphql-react/useLoadGraphQL.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useLoadGraphQL from 'graphql-react/public/useLoadGraphQL.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useLoadGraphQL } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useLoadGraphQL = require('graphql-react/public/useLoadGraphQL.js'); | ||
> ``` | ||
--- | ||
@@ -1027,22 +760,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useLoading } from 'graphql-react'; | ||
> import useLoading from "graphql-react/useLoading.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useLoading from 'graphql-react/public/useLoading.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useLoading } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useLoading = require('graphql-react/public/useLoading.js'); | ||
> ``` | ||
--- | ||
@@ -1062,22 +781,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useLoadingEntry } from 'graphql-react'; | ||
> import useLoadingEntry from "graphql-react/useLoadingEntry.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useLoadingEntry from 'graphql-react/public/useLoadingEntry.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useLoadingEntry } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useLoadingEntry = require('graphql-react/public/useLoadingEntry.js'); | ||
> ``` | ||
--- | ||
@@ -1096,22 +801,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useLoadOnDelete } from 'graphql-react'; | ||
> import useLoadOnDelete from "graphql-react/useLoadOnDelete.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useLoadOnDelete from 'graphql-react/public/useLoadOnDelete.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useLoadOnDelete } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useLoadOnDelete = require('graphql-react/public/useLoadOnDelete.js'); | ||
> ``` | ||
--- | ||
@@ -1130,22 +821,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useLoadOnMount } from 'graphql-react'; | ||
> import useLoadOnMount from "graphql-react/useLoadOnMount.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useLoadOnMount from 'graphql-react/public/useLoadOnMount.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useLoadOnMount } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useLoadOnMount = require('graphql-react/public/useLoadOnMount.js'); | ||
> ``` | ||
--- | ||
@@ -1164,22 +841,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useLoadOnStale } from 'graphql-react'; | ||
> import useLoadOnStale from "graphql-react/useLoadOnStale.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useLoadOnStale from 'graphql-react/public/useLoadOnStale.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useLoadOnStale } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useLoadOnStale = require('graphql-react/public/useLoadOnStale.js'); | ||
> ``` | ||
--- | ||
@@ -1204,22 +867,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { useWaterfallLoad } from 'graphql-react'; | ||
> import useWaterfallLoad from "graphql-react/useWaterfallLoad.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import useWaterfallLoad from 'graphql-react/public/useWaterfallLoad.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { useWaterfallLoad } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const useWaterfallLoad = require('graphql-react/public/useWaterfallLoad.js'); | ||
> ``` | ||
--- | ||
@@ -1240,22 +889,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { CacheContext } from 'graphql-react'; | ||
> import CacheContext from "graphql-react/CacheContext.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import CacheContext from 'graphql-react/public/CacheContext.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { CacheContext } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const CacheContext = require('graphql-react/public/CacheContext.js'); | ||
> ``` | ||
--- | ||
@@ -1276,22 +911,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { HydrationTimeStampContext } from 'graphql-react'; | ||
> import HydrationTimeStampContext from "graphql-react/HydrationTimeStampContext.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import HydrationTimeStampContext from 'graphql-react/public/HydrationTimeStampContext.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { HydrationTimeStampContext } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const HydrationTimeStampContext = require('graphql-react/public/HydrationTimeStampContext.js'); | ||
> ``` | ||
--- | ||
@@ -1312,22 +933,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { LoadingContext } from 'graphql-react'; | ||
> import LoadingContext from "graphql-react/LoadingContext.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import LoadingContext from 'graphql-react/public/LoadingContext.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { LoadingContext } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const LoadingContext = require('graphql-react/public/LoadingContext.js'); | ||
> ``` | ||
--- | ||
@@ -1343,22 +950,8 @@ | ||
_Ways to `import`._ | ||
_How to import._ | ||
> ```js | ||
> import { HYDRATION_TIME_MS } from 'graphql-react'; | ||
> import HYDRATION_TIME_MS from "graphql-react/HYDRATION_TIME_MS.mjs"; | ||
> ``` | ||
> | ||
> ```js | ||
> import HYDRATION_TIME_MS from 'graphql-react/public/HYDRATION_TIME_MS.js'; | ||
> ``` | ||
_Ways to `require`._ | ||
> ```js | ||
> const { HYDRATION_TIME_MS } = require('graphql-react'); | ||
> ``` | ||
> | ||
> ```js | ||
> const HYDRATION_TIME_MS = require('graphql-react/public/HYDRATION_TIME_MS.js'); | ||
> ``` | ||
--- | ||
@@ -1449,3 +1042,3 @@ | ||
| `locations` | Array<{line: number, column: number}>? | GraphQL query locations related to the error. | | ||
| `path` | Array<string>? | [GraphQL result](#type-graphqlresult) `data` field path related to the error. | | ||
| `path` | Array\<string>? | [GraphQL result](#type-graphqlresult) `data` field path related to the error. | | ||
| `extensions` | object? | Custom error data. If the error was created on the client and not the GraphQL server, this property should be present and contain at least `client: true`, although `code` and error specific properties may be present. | | ||
@@ -1452,0 +1045,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
4
1
85820
32
1183
1059
3
+ Addedreact-waterfall-render@3.0.0(transitive)
- Removedisobject@^4.0.0
- Removedisobject@4.0.0(transitive)
- Removedreact-waterfall-render@2.0.0(transitive)