Skip to content

Commit

Permalink
Drop RelayModern prefix from QueryExecutor
Browse files Browse the repository at this point in the history
Reviewed By: josephsavona

Differential Revision: D27566611

fbshipit-source-id: a3074f8b989388b97a41223c9772c7b3e94239cd
  • Loading branch information
kassens authored and facebook-github-bot committed Apr 5, 2021
1 parent 6294195 commit edef218
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/relay-runtime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ export type {
Subscription,
} from './network/RelayObservable';
export type {GraphQLTaggedNode} from './query/GraphQLTag';
export type {TaskScheduler} from './store/QueryExecutor';
export type {EnvironmentConfig} from './store/RelayModernEnvironment';
export type {TaskScheduler} from './store/RelayModernQueryExecutor';
export type {RecordState} from './store/RelayRecordState';
export type {
FragmentMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class Executor {
}
default:
(this._state: empty);
invariant(false, 'RelayModernQueryExecutor: invalid executor state.');
invariant(false, 'QueryExecutor: invalid executor state.');
}
this._operationExecutions.set(
this._operation.request.identifier,
Expand Down Expand Up @@ -403,7 +403,7 @@ class Executor {
if (isOptimistic && this._state !== 'started') {
invariant(
false,
'RelayModernQueryExecutor: optimistic payload received after server payload.',
'QueryExecutor: optimistic payload received after server payload.',
);
}
if (isOptimistic) {
Expand Down Expand Up @@ -649,7 +649,7 @@ class Executor {
if (this._optimisticUpdates == null) {
warning(
false,
'RelayModernQueryExecutor: Unexpected ModuleImport optimistic ' +
'QueryExecutor: Unexpected ModuleImport optimistic ' +
'update in operation %s.' +
this._operation.request.node.params.name,
);
Expand Down Expand Up @@ -1339,7 +1339,7 @@ function partitionGraphQLResponses(
if (label == null || path == null) {
invariant(
false,
'RelayModernQueryExecutor: invalid incremental payload, expected ' +
'QueryExecutor: invalid incremental payload, expected ' +
'`path` and `label` to either both be null/undefined, or ' +
'`path` to be an `Array<string | number>` and `label` to be a ' +
'`string`.',
Expand Down Expand Up @@ -1391,7 +1391,7 @@ function validateOptimisticResponsePayload(
if (incrementalPlaceholders != null && incrementalPlaceholders.length !== 0) {
invariant(
false,
'RelayModernQueryExecutor: optimistic responses cannot be returned ' +
'QueryExecutor: optimistic responses cannot be returned ' +
'for operations that use incremental data delivery (@defer, ' +
'@stream, and @stream_connection).',
);
Expand Down
15 changes: 7 additions & 8 deletions packages/relay-runtime/store/RelayModernEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

'use strict';

const QueryExecutor = require('./QueryExecutor');
const RelayDefaultHandlerProvider = require('../handlers/RelayDefaultHandlerProvider');
const RelayFeatureFlags = require('../util/RelayFeatureFlags');
const RelayModernQueryExecutor = require('./RelayModernQueryExecutor');
const RelayObservable = require('../network/RelayObservable');
const RelayOperationTracker = require('../store/RelayOperationTracker');
const RelayPublishQueue = require('./RelayPublishQueue');
Expand All @@ -40,8 +40,7 @@ import type {
RenderPolicy,
Variables,
} from '../util/RelayRuntimeTypes';
import type {ActiveState} from './RelayModernQueryExecutor';
import type {TaskScheduler} from './RelayModernQueryExecutor';
import type {ActiveState, TaskScheduler} from './QueryExecutor';
import type {GetDataID} from './RelayResponseNormalizer';
import type {
IEnvironment,
Expand Down Expand Up @@ -242,7 +241,7 @@ class RelayModernEnvironment implements IEnvironment {
applyMutation(optimisticConfig: OptimisticResponseConfig): Disposable {
const subscription = RelayObservable.create(sink => {
const source = RelayObservable.create(_sink => {});
const executor = RelayModernQueryExecutor.execute({
const executor = QueryExecutor.execute({
operation: optimisticConfig.operation,
operationExecutions: this._operationExecutions,
operationLoader: this._operationLoader,
Expand Down Expand Up @@ -282,7 +281,7 @@ class RelayModernEnvironment implements IEnvironment {

commitPayload(operation: OperationDescriptor, payload: PayloadData): void {
RelayObservable.create(sink => {
const executor = RelayModernQueryExecutor.execute({
const executor = QueryExecutor.execute({
operation: operation,
operationExecutions: this._operationExecutions,
operationLoader: this._operationLoader,
Expand Down Expand Up @@ -379,7 +378,7 @@ class RelayModernEnvironment implements IEnvironment {
operation.request.cacheConfig || {},
null,
);
const executor = RelayModernQueryExecutor.execute({
const executor = QueryExecutor.execute({
operation,
operationExecutions: this._operationExecutions,
operationLoader: this._operationLoader,
Expand Down Expand Up @@ -442,7 +441,7 @@ class RelayModernEnvironment implements IEnvironment {
},
uploadables,
);
const executor = RelayModernQueryExecutor.execute({
const executor = QueryExecutor.execute({
operation,
operationExecutions: this._operationExecutions,
operationLoader: this._operationLoader,
Expand Down Expand Up @@ -481,7 +480,7 @@ class RelayModernEnvironment implements IEnvironment {
source: RelayObservable<GraphQLResponse>,
|}): RelayObservable<GraphQLResponse> {
return RelayObservable.create(sink => {
const executor = RelayModernQueryExecutor.execute({
const executor = QueryExecutor.execute({
operation,
operationExecutions: this._operationExecutions,
operationLoader: this._operationLoader,
Expand Down

0 comments on commit edef218

Please sign in to comment.