Skip to content

Commit

Permalink
Remove RelayRecordSourceObjectImpl
Browse files Browse the repository at this point in the history
Reviewed By: jstejada

Differential Revision: D18978530

fbshipit-source-id: db2b50814acb1d648cede6f03c19aa8a9553c804
  • Loading branch information
alunyov authored and facebook-github-bot committed Jan 6, 2020
1 parent fcb2fd9 commit 62fd9d3
Show file tree
Hide file tree
Showing 10 changed files with 5,854 additions and 6,151 deletions.
2,597 changes: 1,288 additions & 1,309 deletions packages/relay-runtime/handlers/connection/__tests__/ConnectionHandler-test.js

Large diffs are not rendered by default.

1,348 changes: 668 additions & 680 deletions packages/relay-runtime/mutations/__tests__/RelayRecordSourceMutator-test.js

Large diffs are not rendered by default.

616 changes: 303 additions & 313 deletions packages/relay-runtime/mutations/__tests__/RelayRecordSourceProxy-test.js

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions packages/relay-runtime/store/RelayRecordSource.js
Expand Up @@ -12,9 +12,7 @@

'use strict';

const RelayFeatureFlags = require('../util/RelayFeatureFlags');
const RelayRecordSourceMapImpl = require('./RelayRecordSourceMapImpl');
const RelayRecordSourceObjectImpl = require('./RelayRecordSourceObjectImpl');

import type {MutableRecordSource, RecordMap} from './RelayStoreTypes';

Expand All @@ -24,10 +22,7 @@ class RelayRecordSource {
}

static create(records?: RecordMap): MutableRecordSource {
const RecordSourceImpl = RelayFeatureFlags.USE_RECORD_SOURCE_MAP_IMPL
? RelayRecordSourceMapImpl
: RelayRecordSourceObjectImpl;
return new RecordSourceImpl(records);
return new RelayRecordSourceMapImpl(records);
}
}

Expand Down
78 changes: 0 additions & 78 deletions packages/relay-runtime/store/RelayRecordSourceObjectImpl.js

This file was deleted.

Expand Up @@ -17,7 +17,6 @@ const RelayModernRecord = require('../RelayModernRecord');
const RelayModernStore = require('../RelayModernStore');
const RelayOptimisticRecordSource = require('../RelayOptimisticRecordSource');
const RelayRecordSourceMapImpl = require('../RelayRecordSourceMapImpl');
const RelayRecordSourceObjectImpl = require('../RelayRecordSourceObjectImpl');

const {getRequest} = require('../../query/GraphQLTag');
const {
Expand Down Expand Up @@ -53,7 +52,6 @@ function assertIsDeeplyFrozen(value: ?{...} | ?$ReadOnlyArray<{...}>) {
}

[
[data => new RelayRecordSourceObjectImpl(data), 'Object'],
[data => new RelayRecordSourceMapImpl(data), 'Map'],
[
data =>
Expand Down

0 comments on commit 62fd9d3

Please sign in to comment.