Skip to content

Commit

Permalink
Pre-suppress errors in xplat ahead of 0.257.0 release
Browse files Browse the repository at this point in the history
Reviewed By: panagosg7

Differential Revision: D67368232

fbshipit-source-id: 23111f62c5731b5a58e15ac8ef2dcd9ea8006573
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Dec 18, 2024
1 parent 658d327 commit ba3e22d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,12 @@ test('renders after GC', () => {
'client:root': {
__id: 'client:root',
__typename: '__Root',
// $FlowFixMe[invalid-computed-prop]
[`${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`]: {
__ref: `client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`,
},
},
// $FlowFixMe[invalid-computed-prop]
[`client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`]: {
__id: `client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`,
__resolverError: null,
Expand All @@ -588,6 +590,7 @@ test('renders after GC', () => {
__resolverValue: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`,
__typename: '__RELAY_RESOLVER__',
},
// $FlowFixMe[invalid-computed-prop]
[`client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`]:
{
__id: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10)`,
Expand All @@ -602,6 +605,7 @@ test('renders after GC', () => {
__ref: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):pageInfo`,
},
},
// $FlowFixMe[invalid-computed-prop]
[`client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0`]:
{
__id: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0`,
Expand All @@ -611,21 +615,26 @@ test('renders after GC', () => {
__ref: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0:node`,
},
},
// $FlowFixMe[invalid-computed-prop]
[`client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0:node`]:
{
__id: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0:node`,
__typename: 'Todo',
// $FlowFixMe[invalid-computed-prop]
[`${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}complete`]: {
__ref: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0:node:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}complete`,
},
// $FlowFixMe[invalid-computed-prop]
[`${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}self`]: {
__ref: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0:node:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}self`,
},
// $FlowFixMe[invalid-computed-prop]
[`${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}text`]: {
__ref: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):edges:0:node:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}text`,
},
todo_id: 'todo-1',
},
// $FlowFixMe[invalid-computed-prop]
[`client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):pageInfo`]:
{
__id: `client:TodoConnection:client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}todos(first:10):pageInfo`,
Expand Down
9 changes: 9 additions & 0 deletions packages/relay-runtime/store/__tests__/DataChecker-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ describe('check()', () => {
id: '1',
__typename: 'User',
'profilePicture(size:32)': {__ref: 'client:1'},
// $FlowFixMe[invalid-computed-prop]
[handleKey]: {__ref: 'client:3'},
},
'client:1': {
Expand Down Expand Up @@ -348,6 +349,7 @@ describe('check()', () => {
id: '1',
__typename: 'User',
'profilePicture(size:32)': {__ref: 'client:1'},
// $FlowFixMe[invalid-computed-prop]
[handleKey]: {__ref: 'client:3'},
},
'client:1': {
Expand Down Expand Up @@ -399,6 +401,7 @@ describe('check()', () => {
id: '1',
__typename: 'User',
'profilePicture(size:32)': {__ref: 'client:1'},
// $FlowFixMe[invalid-computed-prop]
[handleKey]: {__ref: 'client:3'},
},
'client:1': {
Expand Down Expand Up @@ -517,6 +520,7 @@ describe('check()', () => {
id: '1',
__typename: 'User',
'profilePicture(size:32)': {__ref: 'client:1'},
// $FlowFixMe[invalid-computed-prop]
[handleKey]: {__ref: 'client:3'},
},
'client:1': {
Expand Down Expand Up @@ -581,6 +585,7 @@ describe('check()', () => {
__id: 'client:2',
__typename: 'Photo',
uri: 'https://...',
// $FlowFixMe[invalid-computed-prop]
[handleKey]: 'https://...',
},
};
Expand Down Expand Up @@ -2648,6 +2653,7 @@ describe('check()', () => {
name: 'Alice',
// no `id` value
},
// $FlowFixMe[invalid-computed-prop]
[typeID]: {
__id: typeID,
__typename: TYPE_SCHEMA_TYPE,
Expand Down Expand Up @@ -2703,6 +2709,7 @@ describe('check()', () => {
name: 'Alice',
id: '1',
},
// $FlowFixMe[invalid-computed-prop]
[typeID]: {
__id: typeID,
__typename: TYPE_SCHEMA_TYPE,
Expand Down Expand Up @@ -2759,6 +2766,7 @@ describe('check()', () => {
// no 'id' bc not a Node
name: 'Not a Node!',
},
// $FlowFixMe[invalid-computed-prop]
[typeID]: {
__id: typeID,
__typename: TYPE_SCHEMA_TYPE,
Expand Down Expand Up @@ -2862,6 +2870,7 @@ describe('check()', () => {
__typename: 'Text',
text: 'Hello, Antonio',
},
// $FlowFixMe[invalid-computed-prop]
[typeID]: {
__id: typeID,
__typename: TYPE_SCHEMA_TYPE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2436,6 +2436,7 @@ function cloneEventWithSets(event: LogEvent) {
[ROOT_ID]: {
__id: ROOT_ID,
__typename: ROOT_TYPE,
// $FlowFixMe[invalid-computed-prop]
[`node(id:"${nodeID}")`]: {__ref: nodeID},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -841,10 +841,12 @@ describe('RelayReferenceMarker', () => {
'client:root': {
__id: 'client:root',
__typename: '__Root',
// $FlowFixMe[invalid-computed-prop]
[`${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}counter_no_fragment`]: {
__ref: `client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}counter_no_fragment`,
},
},
// $FlowFixMe[invalid-computed-prop]
[`client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}counter_no_fragment`]:
{},
};
Expand Down Expand Up @@ -889,6 +891,7 @@ describe('RelayReferenceMarker', () => {
__id: 'client:root',
__typename: 'Query',
me: {__ref: '1'},
// $FlowFixMe[invalid-computed-prop]
[`${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}counter`]: {
__ref: `client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}counter`,
},
Expand All @@ -897,6 +900,7 @@ describe('RelayReferenceMarker', () => {
__id: '1',
__typename: 'User',
},
// $FlowFixMe[invalid-computed-prop]
[`client:root:${RELAY_READ_TIME_RESOLVER_KEY_PREFIX}counter`]: {},
};
const nodes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,14 @@ describe('RelayResponseNormalizer', () => {
__refs: [edgeID1, null, edgeID2],
},
},
// $FlowFixMe[invalid-computed-prop]
[edgeID1]: {
__id: edgeID1,
__typename: 'FriendsEdge',
cursor: 'cursor:2',
node: {__ref: '2'},
},
// $FlowFixMe[invalid-computed-prop]
[edgeID2]: {
__id: edgeID2,
__typename: 'FriendsEdge',
Expand Down Expand Up @@ -4285,18 +4287,21 @@ describe('RelayResponseNormalizer', () => {
__refs: [edge0ID, edge1ID, edge2ID],
},
},
// $FlowFixMe[invalid-computed-prop]
[edge0ID]: {
__id: edge0ID,
__typename: 'FriendsEdge',
cursor: 'cursor:2',
node: {__ref: '2'},
},
// $FlowFixMe[invalid-computed-prop]
[edge1ID]: {
__id: edge1ID,
__typename: 'FriendsEdge',
cursor: 'cursor:3',
node: {__ref: '3'},
},
// $FlowFixMe[invalid-computed-prop]
[edge2ID]: {
__id: edge2ID,
__typename: 'FriendsEdge',
Expand Down
2 changes: 2 additions & 0 deletions packages/relay-runtime/util/getPaginationVariables.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function getPaginationVariables(
...baseVariables,
...extraVariables,
[backwardMetadata.cursor]: cursor,
// $FlowFixMe[incompatible-type]
[backwardMetadata.count]: count,
};
if (forwardMetadata && forwardMetadata.cursor) {
Expand Down Expand Up @@ -92,6 +93,7 @@ function getPaginationVariables(
...baseVariables,
...extraVariables,
[forwardMetadata.cursor]: cursor,
// $FlowFixMe[incompatible-type]
[forwardMetadata.count]: count,
};
if (backwardMetadata && backwardMetadata.cursor) {
Expand Down
2 changes: 2 additions & 0 deletions packages/relay-test-utils/RelayMockPayloadGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ class RelayMockPayloadGenerator {
mockData = {
...mockData,
[TYPENAME_KEY]: typeName,
// $FlowFixMe[invalid-computed-prop]
[getModuleOperationKey(documentName)]: operation.name,
// $FlowFixMe[invalid-computed-prop]
[getModuleComponentKey(documentName)]:
defaultValues.__module_component,
...this._traverseSelections(
Expand Down

0 comments on commit ba3e22d

Please sign in to comment.