Allowed 'OperationDefintion' query kind in fetchRelayModernQuery
@@ -45,8 +45,10 @@ function fetchRelayModernQuery(
);
const {createOperationSelector, getRequest} = environment.unstable_internal;
const query = getRequest(taggedNode);
+ // Allow `OperationDefinition` since this function is used by Classic core in Compat mode.
if (
- query.kind !== RelayConcreteNode.OPERATION ||
+ (query.kind !== RelayConcreteNode.OPERATION &&
+ query.kind !== 'OperationDefinition') ||
query.operation !== 'query'
) {
throw new Error('fetchRelayModernQuery: Expected query operation');
