react-relay 13.0.0-rc.1 → 13.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/README.md +45 -0
- package/ReactRelayContainerUtils.js.flow +1 -1
- package/ReactRelayContext.js +2 -2
- package/ReactRelayContext.js.flow +1 -1
- package/ReactRelayFragmentContainer.js.flow +1 -1
- package/ReactRelayFragmentMockRenderer.js.flow +1 -1
- package/ReactRelayLocalQueryRenderer.js.flow +1 -1
- package/ReactRelayPaginationContainer.js.flow +1 -1
- package/ReactRelayQueryFetcher.js.flow +1 -1
- package/ReactRelayQueryRenderer.js.flow +1 -1
- package/ReactRelayQueryRendererContext.js.flow +1 -1
- package/ReactRelayRefetchContainer.js.flow +1 -1
- package/ReactRelayTestMocker.js.flow +1 -1
- package/ReactRelayTypes.js.flow +1 -1
- package/RelayContext.js.flow +1 -1
- package/__flowtests__/ReactRelayFragmentContainer-flowtest.js.flow +1 -1
- package/__flowtests__/ReactRelayPaginationContainer-flowtest.js.flow +1 -1
- package/__flowtests__/ReactRelayRefetchContainer-flowtest.js.flow +1 -1
- package/__flowtests__/RelayModern-flowtest.js.flow +1 -1
- package/__flowtests__/RelayModernFlowtest_badref.graphql.js.flow +1 -1
- package/__flowtests__/RelayModernFlowtest_notref.graphql.js.flow +1 -1
- package/__flowtests__/RelayModernFlowtest_user.graphql.js.flow +1 -1
- package/__flowtests__/RelayModernFlowtest_users.graphql.js.flow +1 -1
- package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer2.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtestQuery.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtest_viewer.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtestQuery.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtest_viewer.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/RelayModernFlowtest_badref.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/RelayModernFlowtest_notref.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/RelayModernFlowtest_user.graphql.js.flow +2 -2
- package/__flowtests__/__generated__/RelayModernFlowtest_users.graphql.js.flow +2 -2
- package/assertFragmentMap.js.flow +1 -1
- package/buildReactRelayContainer.js.flow +1 -1
- package/getRootVariablesForFragments.js.flow +1 -1
- package/hooks.js +2 -2
- package/hooks.js.flow +1 -1
- package/index.js +2 -2
- package/index.js.flow +1 -1
- package/isRelayEnvironment.js.flow +1 -1
- package/jest-react/enqueueTask.js.flow +1 -1
- package/jest-react/index.js.flow +1 -1
- package/jest-react/internalAct.js.flow +1 -2
- package/legacy.js +2 -2
- package/legacy.js.flow +1 -1
- package/lib/ReactRelayContainerUtils.js +1 -1
- package/lib/ReactRelayContext.js +1 -1
- package/lib/ReactRelayFragmentContainer.js +1 -1
- package/lib/ReactRelayFragmentMockRenderer.js +1 -1
- package/lib/ReactRelayLocalQueryRenderer.js +1 -1
- package/lib/ReactRelayPaginationContainer.js +1 -1
- package/lib/ReactRelayQueryFetcher.js +1 -1
- package/lib/ReactRelayQueryRenderer.js +1 -1
- package/lib/ReactRelayQueryRendererContext.js +1 -1
- package/lib/ReactRelayRefetchContainer.js +1 -1
- package/lib/ReactRelayTestMocker.js +1 -1
- package/lib/ReactRelayTypes.js +1 -1
- package/lib/RelayContext.js +1 -1
- package/lib/assertFragmentMap.js +1 -1
- package/lib/buildReactRelayContainer.js +1 -1
- package/lib/getRootVariablesForFragments.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/index.js +1 -1
- package/lib/isRelayEnvironment.js +1 -1
- package/lib/jest-react/enqueueTask.js +1 -1
- package/lib/jest-react/internalAct.js +1 -2
- package/lib/legacy.js +1 -1
- package/lib/multi-actor/ActorChange.js +1 -1
- package/lib/multi-actor/index.js +1 -1
- package/lib/multi-actor/useRelayActorEnvironment.js +1 -1
- package/lib/readContext.js +1 -1
- package/lib/relay-hooks/EntryPointContainer.react.js +1 -1
- package/lib/relay-hooks/EntryPointTypes.flow.js +1 -1
- package/lib/relay-hooks/FragmentResource.js +1 -1
- package/lib/relay-hooks/InternalLogger.js +1 -1
- package/lib/relay-hooks/LRUCache.js +1 -1
- package/lib/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js +1 -1
- package/lib/relay-hooks/MatchContainer.js +1 -1
- package/lib/relay-hooks/ProfilerContext.js +1 -1
- package/lib/relay-hooks/QueryResource.js +1 -1
- package/lib/relay-hooks/RelayEnvironmentProvider.js +1 -1
- package/lib/relay-hooks/SuspenseResource.js +1 -1
- package/lib/relay-hooks/loadEntryPoint.js +10 -4
- package/lib/relay-hooks/loadQuery.js +1 -1
- package/lib/relay-hooks/preloadQuery_DEPRECATED.js +1 -1
- package/lib/relay-hooks/prepareEntryPoint_DEPRECATED.js +1 -1
- package/lib/relay-hooks/useBlockingPaginationFragment.js +1 -1
- package/lib/relay-hooks/useEntryPointLoader.js +1 -1
- package/lib/relay-hooks/useFetchTrackingRef.js +1 -1
- package/lib/relay-hooks/useFragment.js +2 -3
- package/lib/relay-hooks/useFragmentNode.js +1 -1
- package/lib/relay-hooks/useIsMountedRef.js +1 -1
- package/lib/relay-hooks/useIsOperationNodeActive.js +1 -1
- package/lib/relay-hooks/useIsParentQueryActive.js +1 -1
- package/lib/relay-hooks/useLazyLoadQuery.js +1 -1
- package/lib/relay-hooks/useLazyLoadQueryNode.js +1 -1
- package/lib/relay-hooks/useLoadMoreFunction.js +1 -1
- package/lib/relay-hooks/useMemoOperationDescriptor.js +1 -1
- package/lib/relay-hooks/useMemoVariables.js +1 -1
- package/lib/relay-hooks/useMutation.js +1 -1
- package/lib/relay-hooks/usePaginationFragment.js +1 -1
- package/lib/relay-hooks/usePreloadedQuery.js +1 -1
- package/lib/relay-hooks/useQueryLoader.js +1 -1
- package/lib/relay-hooks/useRefetchableFragment.js +1 -1
- package/lib/relay-hooks/useRefetchableFragmentNode.js +1 -1
- package/lib/relay-hooks/useRelayEnvironment.js +1 -1
- package/lib/relay-hooks/useStaticFragmentNodeWarning.js +1 -1
- package/lib/relay-hooks/useSubscribeToInvalidationState.js +1 -1
- package/lib/relay-hooks/useSubscription.js +1 -1
- package/multi-actor/ActorChange.js.flow +1 -1
- package/multi-actor/index.js.flow +1 -1
- package/multi-actor/useRelayActorEnvironment.js.flow +1 -1
- package/package.json +3 -3
- package/react-relay-hooks.js +2 -2
- package/react-relay-hooks.min.js +3 -3
- package/react-relay-legacy.js +1 -1
- package/react-relay-legacy.min.js +2 -2
- package/react-relay.js +2 -2
- package/react-relay.min.js +3 -3
- package/readContext.js.flow +1 -1
- package/relay-hooks/EntryPointContainer.react.js.flow +1 -1
- package/relay-hooks/EntryPointTypes.flow.js.flow +1 -1
- package/relay-hooks/FragmentResource.js.flow +1 -1
- package/relay-hooks/InternalLogger.js.flow +1 -1
- package/relay-hooks/LRUCache.js.flow +1 -1
- package/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js.flow +1 -1
- package/relay-hooks/MatchContainer.js.flow +1 -1
- package/relay-hooks/ProfilerContext.js.flow +1 -1
- package/relay-hooks/QueryResource.js.flow +1 -1
- package/relay-hooks/RelayEnvironmentProvider.js.flow +1 -1
- package/relay-hooks/SuspenseResource.js.flow +1 -1
- package/relay-hooks/__flowtests__/EntryPointTypes/EntryPointElementConfig-flowtest.js.flow +1 -1
- package/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js.flow +1 -1
- package/relay-hooks/__flowtests__/__generated__/useFragmentFlowtest_user.graphql.js.flow +59 -0
- package/relay-hooks/__flowtests__/__generated__/useFragmentFlowtest_users.graphql.js.flow +61 -0
- package/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js.flow +1 -1
- package/relay-hooks/__flowtests__/useFragment-flowtest.js.flow +53 -31
- package/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js.flow +1 -1
- package/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js.flow +1 -1
- package/relay-hooks/__flowtests__/utils.js.flow +18 -25
- package/relay-hooks/loadEntryPoint.js.flow +13 -3
- package/relay-hooks/loadQuery.js.flow +1 -1
- package/relay-hooks/preloadQuery_DEPRECATED.js.flow +1 -1
- package/relay-hooks/prepareEntryPoint_DEPRECATED.js.flow +1 -1
- package/relay-hooks/useBlockingPaginationFragment.js.flow +1 -1
- package/relay-hooks/useEntryPointLoader.js.flow +1 -1
- package/relay-hooks/useFetchTrackingRef.js.flow +1 -1
- package/relay-hooks/useFragment.js.flow +23 -34
- package/relay-hooks/useFragmentNode.js.flow +1 -1
- package/relay-hooks/useIsMountedRef.js.flow +1 -1
- package/relay-hooks/useIsOperationNodeActive.js.flow +1 -1
- package/relay-hooks/useIsParentQueryActive.js.flow +1 -1
- package/relay-hooks/useLazyLoadQuery.js.flow +7 -8
- package/relay-hooks/useLazyLoadQueryNode.js.flow +1 -1
- package/relay-hooks/useLoadMoreFunction.js.flow +1 -1
- package/relay-hooks/useMemoOperationDescriptor.js.flow +1 -1
- package/relay-hooks/useMemoVariables.js.flow +1 -1
- package/relay-hooks/useMutation.js.flow +1 -1
- package/relay-hooks/usePaginationFragment.js.flow +1 -1
- package/relay-hooks/usePreloadedQuery.js.flow +1 -1
- package/relay-hooks/useQueryLoader.js.flow +1 -1
- package/relay-hooks/useRefetchableFragment.js.flow +1 -1
- package/relay-hooks/useRefetchableFragmentNode.js.flow +1 -1
- package/relay-hooks/useRelayEnvironment.js.flow +1 -1
- package/relay-hooks/useStaticFragmentNodeWarning.js.flow +1 -1
- package/relay-hooks/useSubscribeToInvalidationState.js.flow +2 -2
- package/relay-hooks/useSubscription.js.flow +1 -1
package/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
## React APIs for Relay
|
2
|
+
|
3
|
+
This package contains a collection of React APIs: Hooks and Components that are
|
4
|
+
integrated with Relay runtime.
|
5
|
+
|
6
|
+
Example:
|
7
|
+
|
8
|
+
```js
|
9
|
+
// @flow
|
10
|
+
|
11
|
+
import type {UserComponent_user$key} from 'UserComponent_user.graphql';
|
12
|
+
|
13
|
+
const React = require('react');
|
14
|
+
|
15
|
+
const {graphql, useFragment} = require('react-relay');
|
16
|
+
|
17
|
+
type Props = {
|
18
|
+
user: UserComponent_user$key,
|
19
|
+
};
|
20
|
+
|
21
|
+
function UserComponent(props: Props) {
|
22
|
+
const data = useFragment(
|
23
|
+
graphql`
|
24
|
+
fragment UserComponent_user on User {
|
25
|
+
name
|
26
|
+
profile_picture(scale: 2) {
|
27
|
+
uri
|
28
|
+
}
|
29
|
+
}
|
30
|
+
`,
|
31
|
+
props.user,
|
32
|
+
);
|
33
|
+
|
34
|
+
return (
|
35
|
+
<>
|
36
|
+
<h1>{data.name}</h1>
|
37
|
+
<div>
|
38
|
+
<img src={data.profile_picture?.uri} />
|
39
|
+
</div>
|
40
|
+
</>
|
41
|
+
);
|
42
|
+
}
|
43
|
+
```
|
44
|
+
|
45
|
+
For complete API reference, visit https://relay.dev/.
|
package/ReactRelayContext.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v13.0.
|
2
|
+
* Relay v13.0.2
|
3
3
|
*
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
package/ReactRelayTypes.js.flow
CHANGED
package/RelayContext.js.flow
CHANGED
package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer.graphql.js.flow
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<6668406e80ad7dc93e7c813889280f83>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer2.graphql.js.flow
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<480a62dc560b619c9f4e6cf75d80f890>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtestQuery.graphql.js.flow
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<b7185da5f330a37a0add055f5262b2bb>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtest_viewer.graphql.js.flow
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<0c271737f13fd548bcf58e0e3ec9d4ad>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<4966fff79753003b0e22a540764f020d>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtest_viewer.graphql.js.flow
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<8a7c1dee99527959e2031640c3ee39e7>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<da21127f700568aaf02b9cfa2a6d86f8>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<5af505c845bc81cfc4ab5316649a2329>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<59c4945eff10b906fbac41d74da830e3>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
|
-
* @generated SignedSource<<
|
7
|
+
* @generated SignedSource<<0f29cb3f58c5e6863095be5bb78fa2ba>>
|
8
8
|
* @flow
|
9
9
|
* @lightSyntaxTransform
|
10
10
|
* @nogrep
|
package/hooks.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v13.0.
|
2
|
+
* Relay v13.0.2
|
3
3
|
*
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
package/hooks.js.flow
CHANGED
package/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v13.0.
|
2
|
+
* Relay v13.0.2
|
3
3
|
*
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
package/index.js.flow
CHANGED
package/jest-react/index.js.flow
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
*
|
4
4
|
* This source code is licensed under the MIT license found in the
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*
|
7
7
|
* @emails oncall+relay
|
8
8
|
* @format
|
9
|
-
*
|
10
9
|
*/
|
11
10
|
|
12
11
|
/* global jest */
|
package/legacy.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v13.0.
|
2
|
+
* Relay v13.0.2
|
3
3
|
*
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
package/legacy.js.flow
CHANGED
package/lib/ReactRelayContext.js
CHANGED
package/lib/ReactRelayTypes.js
CHANGED
package/lib/RelayContext.js
CHANGED
package/lib/assertFragmentMap.js
CHANGED