Do not accept cacheConfig in ReactRelayLocalQueryRenderer.js
@@ -24,12 +24,7 @@ const {
const areEqual = require('areEqual');
-import type {
- GraphQLTaggedNode,
- IEnvironment,
- Variables,
- CacheConfig,
-} from 'relay-runtime';
+import type {GraphQLTaggedNode, IEnvironment, Variables} from 'relay-runtime';
type Props = {
environment: IEnvironment,
@@ -37,7 +32,6 @@ type Props = {
// $FlowFixMe[unclear-type]
render: ({props: ?Object, ...}) => React.Node,
variables: Variables,
- cacheConfig?: ?CacheConfig,
...
};
@@ -53,12 +47,12 @@ function useDeepCompare<T: {...}>(value: T): T {
}
function ReactRelayLocalQueryRenderer(props: Props): React.Node {
- const {environment, query, variables, render, cacheConfig} = props;
+ const {environment, query, variables, render} = props;
const latestVariables = useDeepCompare(variables);
const operation = useMemo(() => {
const request = getRequest(query);
- return createOperationDescriptor(request, latestVariables, cacheConfig);
- }, [query, latestVariables, cacheConfig]);
+ return createOperationDescriptor(request, latestVariables);
+ }, [query, latestVariables]);
const relayContext = useMemo(() => ({environment}), [environment]);
