Merge pull request #452 from sjwilczynski/user/stwilczy/bumpReact

deps: bump all packages to react 18
This commit is contained in:
Eloy Durán 2024-10-22 09:34:04 -07:00 коммит произвёл GitHub
Родитель c184647b2a fe7efe91b7
Коммит d93a228dc5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
50 изменённых файлов: 162 добавлений и 127 удалений

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bump react to 18",
"packageName": "@graphitation/apollo-mock-client",
"email": "Stanislaw.Wilczynski@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "bump react to 18",
"packageName": "@graphitation/apollo-react-relay-duct-tape",
"email": "Stanislaw.Wilczynski@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "revert back to typescript 5",
"packageName": "@graphitation/apollo-react-relay-duct-tape-compiler",
"email": "Stanislaw.Wilczynski@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix after react 18 bump",
"packageName": "@graphitation/embedded-document-artefact-loader",
"email": "Stanislaw.Wilczynski@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "bump react to 18",
"packageName": "@graphitation/rempl-apollo-devtools",
"email": "Stanislaw.Wilczynski@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -2,7 +2,7 @@
"name": "graphql-playground", "name": "graphql-playground",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "DISABLE_ESLINT_PLUGIN=true react-scripts start" "start": "react-scripts start"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [

Просмотреть файл

@ -1,3 +1,4 @@
import * as React from "react";
import { ApolloProvider } from "@apollo/client"; import { ApolloProvider } from "@apollo/client";
import { buildClient } from "data/data-builder"; import { buildClient } from "data/data-builder";
import ChatContainer from "./chat/chat-container"; import ChatContainer from "./chat/chat-container";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useApolloClient } from "@apollo/client/react"; import { useApolloClient } from "@apollo/client/react";
import { useQuery, gql, useMutation } from "@apollo/client"; import { useQuery, gql, useMutation } from "@apollo/client";
import { ChatRenderer } from "./chat-renderer"; import { ChatRenderer } from "./chat-renderer";
@ -53,7 +53,7 @@ const ChatContainer = () => {
}); });
}, []); }, []);
const removeMessageFunction = React.useCallback((id) => { const removeMessageFunction = React.useCallback((id: string) => {
removeMessage({ removeMessage({
variables: { id }, variables: { id },
update(cache) { update(cache) {
@ -62,7 +62,7 @@ const ChatContainer = () => {
chat: (previous) => { chat: (previous) => {
return [ return [
previous.messages.filter( previous.messages.filter(
({ messageId }: { messageId: string[] }) => messageId !== id, ({ messageId }: { messageId: string }) => messageId !== id,
), ),
]; ];
}, },

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { Messages } from "./messages"; import { Messages } from "./messages";
import { Title2, Button } from "@fluentui/react-components"; import { Title2, Button } from "@fluentui/react-components";
import { useChatRendererStyles } from "./chat-renderer.styles"; import { useChatRendererStyles } from "./chat-renderer.styles";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useQuery, gql } from "@apollo/client"; import { useQuery, gql } from "@apollo/client";
const MESSAGE = gql` const MESSAGE = gql`

Просмотреть файл

@ -1,3 +1,4 @@
import * as React from "react";
import { Button, Text } from "@fluentui/react-components"; import { Button, Text } from "@fluentui/react-components";
import Message from "./message"; import Message from "./message";
import { useMessagesStyles } from "./messages.styles"; import { useMessagesStyles } from "./messages.styles";

Просмотреть файл

@ -1,6 +1,4 @@
/** @jsxImportSource @emotion/react */ import * as React from "react";
import React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import App from "./components/app"; import App from "./components/app";

Просмотреть файл

@ -8,13 +8,13 @@
"@graphitation/graphql-js-tag": "^0.9.3", "@graphitation/graphql-js-tag": "^0.9.3",
"@graphql-tools/schema": "^9.0.19", "@graphql-tools/schema": "^9.0.19",
"graphql": "^15.6.0", "graphql": "^15.6.0",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2" "react-dom": "^18.2.0"
}, },
"scripts": { "scripts": {
"start": "yarn generate-resolver-typings && concurrently \"yarn duct-tape-compiler --watch\" \"yarn serve\"", "start": "yarn generate-resolver-typings && concurrently \"yarn duct-tape-compiler --watch\" \"yarn serve\"",
"serve": "webpack serve", "serve": "webpack serve",
"build": "webpack", "build": "yarn duct-tape-compiler && webpack",
"duct-tape-compiler": "duct-tape-compiler --schema ./data/schema.graphql --src ./src --emitQueryDebugComments", "duct-tape-compiler": "duct-tape-compiler --schema ./data/schema.graphql --src ./src --emitQueryDebugComments",
"generate-resolver-typings": "graphql-codegen --config codegen.yml" "generate-resolver-typings": "graphql-codegen --config codegen.yml"
}, },
@ -43,8 +43,8 @@
"@graphql-codegen/typescript": "2.2.2", "@graphql-codegen/typescript": "2.2.2",
"@graphql-codegen/typescript-resolvers": "^2.2.1", "@graphql-codegen/typescript-resolvers": "^2.2.1",
"@types/node": "^12.0.0", "@types/node": "^12.0.0",
"@types/react": "^17.0.0", "@types/react": "^18.2.29",
"@types/react-dom": "^17.0.0", "@types/react-dom": "^18.2.0",
"@types/webpack": "^5.28.0", "@types/webpack": "^5.28.0",
"@types/webpack-dev-server": "^4.7.2", "@types/webpack-dev-server": "^4.7.2",
"@welldone-software/why-did-you-render": "^6.2.1", "@welldone-software/why-did-you-render": "^6.2.1",

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { graphql } from "@graphitation/graphql-js-tag"; import { graphql } from "@graphitation/graphql-js-tag";
import { useLazyLoadQuery } from "@graphitation/apollo-react-relay-duct-tape"; import { useLazyLoadQuery } from "@graphitation/apollo-react-relay-duct-tape";

Просмотреть файл

@ -3,7 +3,7 @@
* https://github.com/loadingio/css-spinner/tree/master/src/spinner * https://github.com/loadingio/css-spinner/tree/master/src/spinner
*/ */
import React from "react"; import * as React from "react";
export const LoadingSpinner: React.FC = () => ( export const LoadingSpinner: React.FC = () => (
<div className="lds-spinner"> <div className="lds-spinner">

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { import {
useFragment, useFragment,
shallowCompareFragmentReferences, shallowCompareFragmentReferences,

Просмотреть файл

@ -1,6 +1,6 @@
import "./wdyr"; import "./wdyr";
import React from "react"; import * as React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import App from "./App"; import App from "./App";
import { ApolloClient, ApolloProvider } from "@apollo/client"; import { ApolloClient, ApolloProvider } from "@apollo/client";
@ -14,7 +14,7 @@ ReactDOM.render(
<App /> <App />
</ApolloProvider> </ApolloProvider>
</React.StrictMode>, </React.StrictMode>,
document.getElementById("root") document.getElementById("root"),
); );
/** /**

Просмотреть файл

@ -1,6 +1,6 @@
/// <reference types="@welldone-software/why-did-you-render" /> /// <reference types="@welldone-software/why-did-you-render" />
import React from "react"; import * as React from "react";
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
const whyDidYouRender = require("@welldone-software/why-did-you-render"); const whyDidYouRender = require("@welldone-software/why-did-you-render");

Просмотреть файл

@ -25,8 +25,8 @@
"graphql-tools": "^8.2.0", "graphql-tools": "^8.2.0",
"html-webpack-plugin": "^5.3.2", "html-webpack-plugin": "^5.3.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2", "react-dom": "^18.2.0",
"ts-loader": "^9.0.0", "ts-loader": "^9.0.0",
"ts-node": "^10.4.0", "ts-node": "^10.4.0",
"uuid": "^8.3.2", "uuid": "^8.3.2",
@ -53,8 +53,8 @@
"@graphql-codegen/typescript": "^2.3.0", "@graphql-codegen/typescript": "^2.3.0",
"@types/graphql": "^14.5.0", "@types/graphql": "^14.5.0",
"@types/lodash": "^4.14.175", "@types/lodash": "^4.14.175",
"@types/react": "^17.0.30", "@types/react": "^18.2.29",
"@types/react-dom": "^17.0.9", "@types/react-dom": "^18.2.0",
"@types/uuid": "^8.3.1", "@types/uuid": "^8.3.1",
"graphql-let": "^0.18.5", "graphql-let": "^0.18.5",
"prettier": "^2.8.7", "prettier": "^2.8.7",

Просмотреть файл

@ -4,7 +4,7 @@ import {
from, from,
ApolloProvider, ApolloProvider,
} from "@apollo/client"; } from "@apollo/client";
import React from "react"; import * as React from "react";
import { onError } from "@apollo/client/link/error"; import { onError } from "@apollo/client/link/error";
import TodoList from "./components/TodoList"; import TodoList from "./components/TodoList";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useFragment } from "@graphitation/apollo-react-relay-duct-tape"; import { useFragment } from "@graphitation/apollo-react-relay-duct-tape";
import { graphql } from "@graphitation/graphql-js-tag"; import { graphql } from "@graphitation/graphql-js-tag";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useLazyLoadQuery } from "@graphitation/apollo-react-relay-duct-tape"; import { useLazyLoadQuery } from "@graphitation/apollo-react-relay-duct-tape";
import { graphql } from "@graphitation/graphql-js-tag"; import { graphql } from "@graphitation/graphql-js-tag";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useSubscription } from "@graphitation/apollo-react-relay-duct-tape"; import { useSubscription } from "@graphitation/apollo-react-relay-duct-tape";
import { graphql } from "@graphitation/graphql-js-tag"; import { graphql } from "@graphitation/graphql-js-tag";

Просмотреть файл

@ -22,12 +22,12 @@
"@graphitation/graphql-js-operation-payload-generator": "^0.12.7", "@graphitation/graphql-js-operation-payload-generator": "^0.12.7",
"@types/invariant": "^2.2.34", "@types/invariant": "^2.2.34",
"@types/jest": "^26.0.22", "@types/jest": "^26.0.22",
"@types/react": "^17.0.3", "@types/react": "^18.2.29",
"@types/react-test-renderer": "^17.0.1", "@types/react-test-renderer": "^18.0.0",
"graphql": "^15.0.0", "graphql": "^15.0.0",
"monorepo-scripts": "*", "monorepo-scripts": "*",
"react": "^17.0.2", "react": "^18.2.0",
"react-test-renderer": "^17.0.2" "react-test-renderer": "^18.2.0"
}, },
"peerDependencies": { "peerDependencies": {
"@apollo/client": ">= ^3.3.0 < 3.7.0", "@apollo/client": ">= ^3.3.0 < 3.7.0",

Просмотреть файл

@ -7,7 +7,7 @@
* https://github.com/facebook/relay/blob/5d7e2d4a318c5015e2ac91f5f4e7ca602658890c/LICENSE * https://github.com/facebook/relay/blob/5d7e2d4a318c5015e2ac91f5f4e7ca602658890c/LICENSE
*/ */
import React from "react"; import * as React from "react";
import { graphql } from "@graphitation/graphql-js-tag"; import { graphql } from "@graphitation/graphql-js-tag";
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { buildSchema, DocumentNode } from "graphql"; import { buildSchema, DocumentNode } from "graphql";

Просмотреть файл

@ -38,13 +38,13 @@
"relay-test-utils": "^12.0.0", "relay-test-utils": "^12.0.0",
"relay-test-utils-internal": "^12.0.0", "relay-test-utils-internal": "^12.0.0",
"ts-node": "^10.4.0", "ts-node": "^10.4.0",
"typescript": "^5.5.3", "typescript": "<5",
"@types/yargs": "^17.0.13" "@types/yargs": "^17.0.13"
}, },
"peerDependencies": { "peerDependencies": {
"graphql": "^15.0.0", "graphql": "^15.0.0",
"@graphitation/supermassive": "^3.5.5", "@graphitation/supermassive": "^3.5.5",
"typescript": "^5.5.3" "typescript": "<5"
}, },
"publishConfig": { "publishConfig": {
"main": "./lib/index.js", "main": "./lib/index.js",

Просмотреть файл

@ -26,17 +26,17 @@
"@graphitation/graphql-js-tag": "^0.9.3", "@graphitation/graphql-js-tag": "^0.9.3",
"@types/jest": "^26.0.22", "@types/jest": "^26.0.22",
"@types/lodash": "^4.14.176", "@types/lodash": "^4.14.176",
"@types/react": "^17.0.3", "@types/react": "^18.2.29",
"graphql": "^15.0.0", "graphql": "^15.0.0",
"monorepo-scripts": "*", "monorepo-scripts": "*",
"react": "^17.0.2", "react": "^18.2.0",
"@graphitation/apollo-react-relay-duct-tape-compiler": "^1.5.6", "@graphitation/apollo-react-relay-duct-tape-compiler": "^1.5.6",
"ts-expect": "^1.3.0" "ts-expect": "^1.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"@apollo/client": ">= ^3.3.0 < 3.7.0", "@apollo/client": ">= ^3.3.0 < 3.7.0",
"graphql": "^15.0.0", "graphql": "^15.0.0",
"react": "^17.0.2" "react": "^18.2.0"
}, },
"dependencies": { "dependencies": {
"invariant": "^2.2.4", "invariant": "^2.2.4",

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { buildSchema } from "graphql"; import { buildSchema } from "graphql";
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { join } from "path"; import { join } from "path";
@ -119,11 +119,9 @@ interface SubjectProps {
onError?: SubscriptionHookParams["onError"] | null; onError?: SubscriptionHookParams["onError"] | null;
} }
const SubscriptionComponent: React.FC<SubjectProps> = ({ const SubscriptionComponent: React.FC<
onNext = jest.fn(), React.PropsWithChildren<SubjectProps>
onError = jest.fn(), > = ({ onNext = jest.fn(), onError = jest.fn(), children }) => {
children,
}) => {
useSubscription<hooksTestSubscription>({ useSubscription<hooksTestSubscription>({
subscription, subscription,
variables: { id: "some-user-id" }, variables: { id: "some-user-id" },

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { create as createTestRenderer } from "react-test-renderer"; import { create as createTestRenderer } from "react-test-renderer";
import { import {
ApolloClient, ApolloClient,

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { import {
ApolloClient, ApolloClient,
WatchQueryFetchPolicy, WatchQueryFetchPolicy,
@ -1310,7 +1310,7 @@ describe.each([
}); });
}); });
class ErrorBoundary extends React.Component { class ErrorBoundary extends React.Component<React.PropsWithChildren<unknown>> {
state = { hasError: false }; state = { hasError: false };
static getDerivedStateFromError(_error: Error) { static getDerivedStateFromError(_error: Error) {

Просмотреть файл

@ -3,7 +3,7 @@ import {
useApolloClient as useDefaultApolloClient, useApolloClient as useDefaultApolloClient,
} from "@apollo/client"; } from "@apollo/client";
import invariant from "invariant"; import invariant from "invariant";
import React from "react"; import * as React from "react";
/** /**
* @internal * @internal
@ -29,9 +29,11 @@ const ApolloReactRelayDuctTapeContext = React.createContext<
* This allows a subset of a tree to use apollo-react-relay-duct-tape using a * This allows a subset of a tree to use apollo-react-relay-duct-tape using a
* different ApolloClient instance than the rest of the tree above and below it. * different ApolloClient instance than the rest of the tree above and below it.
*/ */
export const ApolloReactRelayDuctTapeProvider: React.FC<{ export const ApolloReactRelayDuctTapeProvider: React.FC<
client: ApolloClient<unknown>; React.PropsWithChildren<{
}> = (props) => { client: ApolloClient<unknown>;
}>
> = (props) => {
invariant( invariant(
props.client, props.client,
"ApolloReactRelayDuctTapeProvider: client is required", "ApolloReactRelayDuctTapeProvider: client is required",

Просмотреть файл

@ -4,6 +4,8 @@ import * as path from "path";
import { SourceMapGenerator } from "source-map-js"; import { SourceMapGenerator } from "source-map-js";
import * as transformModule from "../transform"; import * as transformModule from "../transform";
jest.setTimeout(15000);
describe("jest loader", () => { describe("jest loader", () => {
afterEach(() => { afterEach(() => {
jest.clearAllMocks(); jest.clearAllMocks();

Просмотреть файл

@ -26,10 +26,10 @@
"@graphql-tools/schema": "^7.1.5", "@graphql-tools/schema": "^7.1.5",
"@types/lodash.debounce": "^4.0.6", "@types/lodash.debounce": "^4.0.6",
"@types/lodash.isequal": "^4.5.5", "@types/lodash.isequal": "^4.5.5",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^18.2.0",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"@types/react-router": "^5.1.18", "@types/react-router": "^5.1.18",
"@types/react": "^17.0.2", "@types/react": "^18.2.29",
"@types/uuid": "^8.3.4", "@types/uuid": "^8.3.4",
"apollo-inspector-ui": "^0.0.8", "apollo-inspector-ui": "^0.0.8",
"apollo-inspector": "^1.17.6", "apollo-inspector": "^1.17.6",
@ -39,9 +39,9 @@
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0", "lodash.isequal": "^4.5.0",
"object-sizeof": "^1.6.1", "object-sizeof": "^1.6.1",
"react-dom": "^17.0.2", "react-dom": "^18.2.0",
"react-router-dom": "^5.3.3", "react-router-dom": "^5.3.3",
"react": "^17.0.2", "react": "^18.2.0",
"rempl": "^1.0.0-alpha.24", "rempl": "^1.0.0-alpha.24",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"scheduler": "^0.20.2", "scheduler": "^0.20.2",

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useStyles } from "./dropdown.styles"; import { useStyles } from "./dropdown.styles";
import { mergeClasses, Text } from "@fluentui/react-components"; import { mergeClasses, Text } from "@fluentui/react-components";
import { import {

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { tabMenuStyles } from "./tab-menu.styles"; import { tabMenuStyles } from "./tab-menu.styles";
import { mergeClasses } from "@fluentui/react-components"; import { mergeClasses } from "@fluentui/react-components";
import { useArrowNavigationGroup } from "@fluentui/react-tabster"; import { useArrowNavigationGroup } from "@fluentui/react-tabster";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { searchStyles } from "./search.styles"; import { searchStyles } from "./search.styles";
import { Search20Regular } from "@fluentui/react-icons"; import { Search20Regular } from "@fluentui/react-icons";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { Button, Text } from "@fluentui/react-components"; import { Button, Text } from "@fluentui/react-components";
import { useStyles } from "./vertical-viewer.styles"; import { useStyles } from "./vertical-viewer.styles";
import { import {

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { ApolloGlobalOperations } from "../../types"; import { ApolloGlobalOperations } from "../../types";
import { useStyles } from "./additional-info.styles"; import { useStyles } from "./additional-info.styles";
import { import {

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { useStyles } from "./apollo-cache-duplicated-items.styles"; import { useStyles } from "./apollo-cache-duplicated-items.styles";
import { import {
Accordion, Accordion,

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { CacheObjectWithSize } from "./types"; import { CacheObjectWithSize } from "./types";
import { useStyles } from "./apollo-cache-items.styles"; import { useStyles } from "./apollo-cache-items.styles";
import { Button, mergeClasses, Text } from "@fluentui/react-components"; import { Button, mergeClasses, Text } from "@fluentui/react-components";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { ActivityDialog, List, Dialog } from "../../components"; import { ActivityDialog, List, Dialog } from "../../components";
import { mergeClasses, Text } from "@fluentui/react-components"; import { mergeClasses, Text } from "@fluentui/react-components";
import { useStyles } from "./recent-activity.styles"; import { useStyles } from "./recent-activity.styles";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import { NormalizedCacheObject } from "@apollo/client/cache"; import { NormalizedCacheObject } from "@apollo/client/cache";
import { remplSubscriber } from "../rempl"; import { remplSubscriber } from "../rempl";

Просмотреть файл

@ -12,7 +12,7 @@ keywords:
## `useFragment` ## `useFragment`
```tsx ```tsx
import React from "react"; import * as React from "react";
import { import {
graphql, graphql,
useFragment, useFragment,

Просмотреть файл

@ -14,7 +14,7 @@ keywords:
Hook used to fetch a GraphQL query during render. This hook can trigger multiple nested or waterfalling round trips if used without caution, and waits until render to start a data fetch. Hook used to fetch a GraphQL query during render. This hook can trigger multiple nested or waterfalling round trips if used without caution, and waits until render to start a data fetch.
```tsx ```tsx
import React from "react"; import * as React from "react";
import { import {
graphql, graphql,
useLazyLoadQuery, useLazyLoadQuery,

Просмотреть файл

@ -13,7 +13,7 @@ keywords:
You can use `usePaginationFragment` to render a fragment that uses a `@connection` and paginate over it: You can use `usePaginationFragment` to render a fragment that uses a `@connection` and paginate over it:
```tsx ```tsx
import React from "react"; import * as React from "react";
import { import {
graphql, graphql,
usePaginationFragment, usePaginationFragment,

Просмотреть файл

@ -13,7 +13,7 @@ keywords:
You can use `useRefetchableFragment` when you want to fetch and re-render a fragment with different data: You can use `useRefetchableFragment` when you want to fetch and re-render a fragment with different data:
```tsx ```tsx
import React from "react"; import * as React from "react";
import { import {
graphql, graphql,
useRefetchableFragment, useRefetchableFragment,

Просмотреть файл

@ -65,13 +65,3 @@ function UserComponent({ id }) {
- Unsubscribe and resubscribe with new values if the environment, config or `requestSubscriptionFn` changes. - Unsubscribe and resubscribe with new values if the environment, config or `requestSubscriptionFn` changes.
- If you have the need to do something more complicated, such as imperatively requesting a subscription, please use the [`requestSubscription`](../request-subscription/) API directly. - If you have the need to do something more complicated, such as imperatively requesting a subscription, please use the [`requestSubscription`](../request-subscription/) API directly.
- See the [GraphQL Subscriptions Guide](../../guided-tour/updating-data/graphql-subscriptions/) for a more detailed explanation of how to work with subscriptions. - See the [GraphQL Subscriptions Guide](../../guided-tour/updating-data/graphql-subscriptions/) for a more detailed explanation of how to work with subscriptions.
<FbInternalOnly>
:::note
`useSubscription` doesn't automatically add `client_subscription_id`. You may need to provide an arbitrary `client_subscription_id` to `config.variables.input`
:::
</FbInternalOnly>
<DocsRating />

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import clsx from "clsx"; import clsx from "clsx";
import styles from "./HomepageFeatures.module.css"; import styles from "./HomepageFeatures.module.css";
import Link from "@docusaurus/Link"; import Link from "@docusaurus/Link";

Просмотреть файл

@ -1,4 +1,4 @@
import React from "react"; import * as React from "react";
import clsx from "clsx"; import clsx from "clsx";
import Layout from "@theme/Layout"; import Layout from "@theme/Layout";
import Link from "@docusaurus/Link"; import Link from "@docusaurus/Link";

102
yarn.lock
Просмотреть файл

@ -3800,12 +3800,12 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc"
integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==
"@types/react-dom@^17.0.0", "@types/react-dom@^17.0.2", "@types/react-dom@^17.0.9": "@types/react-dom@^18.2.0":
version "17.0.17" version "18.3.1"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.17.tgz#2e3743277a793a96a99f1bf87614598289da68a1" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.1.tgz#1e4654c08a9cdcfb6594c780ac59b55aad42fe07"
integrity sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg== integrity sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==
dependencies: dependencies:
"@types/react" "^17" "@types/react" "*"
"@types/react-router-dom@^5.3.3": "@types/react-router-dom@^5.3.3":
version "5.3.3" version "5.3.3"
@ -3824,20 +3824,19 @@
"@types/history" "^4.7.11" "@types/history" "^4.7.11"
"@types/react" "*" "@types/react" "*"
"@types/react-test-renderer@^17.0.1": "@types/react-test-renderer@^18.0.0":
version "17.0.1" version "18.3.0"
resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz#3120f7d1c157fba9df0118dae20cb0297ee0e06b" resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-18.3.0.tgz#839502eae70058a4ae161f63385a8e7929cef4c0"
integrity sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw== integrity sha512-HW4MuEYxfDbOHQsVlY/XtOvNHftCVEPhJF2pQXXwcUiUF+Oyb0usgp48HSgpK5rt8m9KZb22yqOeZm+rrVG8gw==
dependencies: dependencies:
"@types/react" "*" "@types/react" "*"
"@types/react@*", "@types/react@^17", "@types/react@^17.0.0", "@types/react@^17.0.2", "@types/react@^17.0.3", "@types/react@^17.0.30": "@types/react@*", "@types/react@^18.2.29":
version "17.0.45" version "18.3.11"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.45.tgz#9b3d5b661fd26365fefef0e766a1c6c30ccf7b3f" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.11.tgz#9d530601ff843ee0d7030d4227ea4360236bd537"
integrity sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg== integrity sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==
dependencies: dependencies:
"@types/prop-types" "*" "@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2" csstype "^3.0.2"
"@types/relay-compiler@^8.0.0": "@types/relay-compiler@^8.0.0":
@ -3858,11 +3857,6 @@
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065"
integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g== integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==
"@types/scheduler@*":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.1.tgz#18845205e86ff0038517aab7a18a62a6b9f71275"
integrity sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==
"@types/semver@^7.3.12": "@types/semver@^7.3.12":
version "7.5.0" version "7.5.0"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a"
@ -10227,14 +10221,13 @@ react-clientside-effect@^1.2.6:
dependencies: dependencies:
"@babel/runtime" "^7.12.13" "@babel/runtime" "^7.12.13"
react-dom@^17.0.2: react-dom@^18.2.0:
version "17.0.2" version "18.3.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
dependencies: dependencies:
loose-envify "^1.1.0" loose-envify "^1.1.0"
object-assign "^4.1.1" scheduler "^0.23.2"
scheduler "^0.20.2"
react-focus-lock@^2.5.2: react-focus-lock@^2.5.2:
version "2.9.1" version "2.9.1"
@ -10248,16 +10241,21 @@ react-focus-lock@^2.5.2:
use-callback-ref "^1.3.0" use-callback-ref "^1.3.0"
use-sidecar "^1.1.2" use-sidecar "^1.1.2"
"react-is@^16.12.0 || ^17.0.0", react-is@^17.0.1, react-is@^17.0.2: "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.3.1:
version "17.0.2" version "18.3.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0: react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
version "16.13.1" version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react-is@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
react-is@^18.0.0: react-is@^18.0.0:
version "18.2.0" version "18.2.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
@ -10311,13 +10309,13 @@ react-router@5.3.3:
tiny-invariant "^1.0.2" tiny-invariant "^1.0.2"
tiny-warning "^1.0.0" tiny-warning "^1.0.0"
react-shallow-renderer@^16.13.1: react-shallow-renderer@^16.15.0:
version "16.14.1" version "16.15.0"
resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz#bf0d02df8a519a558fd9b8215442efa5c840e124" resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz#48fb2cf9b23d23cde96708fe5273a7d3446f4457"
integrity sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg== integrity sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==
dependencies: dependencies:
object-assign "^4.1.1" object-assign "^4.1.1"
react-is "^16.12.0 || ^17.0.0" react-is "^16.12.0 || ^17.0.0 || ^18.0.0"
react-style-singleton@^2.2.1: react-style-singleton@^2.2.1:
version "2.2.1" version "2.2.1"
@ -10328,15 +10326,14 @@ react-style-singleton@^2.2.1:
invariant "^2.2.4" invariant "^2.2.4"
tslib "^2.0.0" tslib "^2.0.0"
react-test-renderer@^17.0.2: react-test-renderer@^18.2.0:
version "17.0.2" version "18.3.1"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-17.0.2.tgz#4cd4ae5ef1ad5670fc0ef776e8cc7e1231d9866c" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-18.3.1.tgz#e693608a1f96283400d4a3afead6893f958b80b4"
integrity sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ== integrity sha512-KkAgygexHUkQqtvvx/otwxtuFu5cVjfzTCtjXLH9boS19/Nbtg84zS7wIQn39G8IlrhThBpQsMKkq5ZHZIYFXA==
dependencies: dependencies:
object-assign "^4.1.1" react-is "^18.3.1"
react-is "^17.0.2" react-shallow-renderer "^16.15.0"
react-shallow-renderer "^16.13.1" scheduler "^0.23.2"
scheduler "^0.20.2"
react-transition-group@^4.4.1: react-transition-group@^4.4.1:
version "4.4.5" version "4.4.5"
@ -10356,13 +10353,12 @@ react-window@^1.8.6:
"@babel/runtime" "^7.0.0" "@babel/runtime" "^7.0.0"
memoize-one ">=3.1.1 <6" memoize-one ">=3.1.1 <6"
react@^17.0.2: react@^18.2.0:
version "17.0.2" version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
dependencies: dependencies:
loose-envify "^1.1.0" loose-envify "^1.1.0"
object-assign "^4.1.1"
readable-stream@^2.0.1, readable-stream@^2.0.2: readable-stream@^2.0.1, readable-stream@^2.0.2:
version "2.3.7" version "2.3.7"
@ -10759,6 +10755,13 @@ scheduler@^0.20.2:
loose-envify "^1.1.0" loose-envify "^1.1.0"
object-assign "^4.1.1" object-assign "^4.1.1"
scheduler@^0.23.2:
version "0.23.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
dependencies:
loose-envify "^1.1.0"
schema-utils@3.0.0: schema-utils@3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef"
@ -11741,6 +11744,11 @@ typescript@5.5.3, typescript@^5.5.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa"
integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ== integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==
typescript@<5:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@~3.7.2: typescript@~3.7.2:
version "3.7.7" version "3.7.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.7.tgz#c931733e2ec10dda56b855b379cc488a72a81199" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.7.tgz#c931733e2ec10dda56b855b379cc488a72a81199"