@salesforce/lds-runtime-mobile 1.155.0 → 1.156.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +41 -33
- package/package.json +1 -1
- package/sfdc/main.js +41 -33
package/dist/main.js
CHANGED
|
@@ -4053,38 +4053,32 @@ function recordQuery(selection, apiName, alias, predicates, input) {
|
|
|
4053
4053
|
const draftsField = { type: FieldType.Scalar, extract, path: 'node._drafts' };
|
|
4054
4054
|
const idExtract = { type: ValueType.Extract, jsonAlias: alias, field: 'Id' };
|
|
4055
4055
|
const idField = { type: FieldType.Scalar, extract: idExtract, path: 'node.Id' };
|
|
4056
|
-
// When the exclude stale records gate is open
|
|
4057
|
-
//
|
|
4058
|
-
//
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
const
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
predicates.push({
|
|
4083
|
-
type: PredicateType$1.compound,
|
|
4084
|
-
operator: CompoundOperator.or,
|
|
4085
|
-
children: [timestampCheck, isDraft],
|
|
4086
|
-
});
|
|
4087
|
-
}
|
|
4056
|
+
// When the exclude stale records gate is open and there is a root timestamp
|
|
4057
|
+
// in the parser input, inject an additional predicate to limit the search
|
|
4058
|
+
// to records that either have drafts associated to them or were ingested at
|
|
4059
|
+
// least as recently as the query.
|
|
4060
|
+
if (excludeStaleRecordsGate.isOpen({ fallback: false }) && input.rootTimestamp !== undefined) {
|
|
4061
|
+
const timestampCheck = {
|
|
4062
|
+
type: PredicateType$1.comparison,
|
|
4063
|
+
left: {
|
|
4064
|
+
type: ValueType.Extract,
|
|
4065
|
+
jsonAlias: alias,
|
|
4066
|
+
field: 'ingestionTimestamp',
|
|
4067
|
+
metadata: true,
|
|
4068
|
+
},
|
|
4069
|
+
operator: ComparisonOperator.gte,
|
|
4070
|
+
right: { type: ValueType.IntLiteral, value: input.rootTimestamp },
|
|
4071
|
+
};
|
|
4072
|
+
const isDraft = {
|
|
4073
|
+
type: PredicateType$1.nullComparison,
|
|
4074
|
+
left: { type: ValueType.Extract, jsonAlias: alias, field: 'drafts' },
|
|
4075
|
+
operator: NullComparisonOperator.isNot,
|
|
4076
|
+
};
|
|
4077
|
+
predicates.push({
|
|
4078
|
+
type: PredicateType$1.compound,
|
|
4079
|
+
operator: CompoundOperator.or,
|
|
4080
|
+
children: [timestampCheck, isDraft],
|
|
4081
|
+
});
|
|
4088
4082
|
}
|
|
4089
4083
|
return queryContainer(internalFields, alias, apiName, predicates).map((result) => {
|
|
4090
4084
|
const { fields, predicates } = result;
|
|
@@ -4134,6 +4128,20 @@ function rootRecordQuery(selection, input) {
|
|
|
4134
4128
|
if (input.objectInfoMap[alias] === undefined) {
|
|
4135
4129
|
return failure([missingObjectInfo(apiName)]);
|
|
4136
4130
|
}
|
|
4131
|
+
// When the exclude stale records gate is open and the query has an
|
|
4132
|
+
// ingestion timestamp in its cache metadata, associate that with the input
|
|
4133
|
+
// so it can later be used to limit the search to records were ingested at
|
|
4134
|
+
// least as recently as the query.
|
|
4135
|
+
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
4136
|
+
const key = input.connectionKeyBuilder(selection, input.config.variables);
|
|
4137
|
+
const queryMetadata = input.metadata[key];
|
|
4138
|
+
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
4139
|
+
// skip setting the root timestamp
|
|
4140
|
+
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
4141
|
+
// subtract 10ms from timestamp to account for ingestion processing time
|
|
4142
|
+
input.rootTimestamp = queryMetadata.ingestionTimestamp - 10;
|
|
4143
|
+
}
|
|
4144
|
+
}
|
|
4137
4145
|
return recordQuery(selection, alias, apiName, [], input);
|
|
4138
4146
|
}
|
|
4139
4147
|
function rootQuery(recordNodes, input) {
|
|
@@ -15976,4 +15984,4 @@ register({
|
|
|
15976
15984
|
});
|
|
15977
15985
|
|
|
15978
15986
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15979
|
-
// version: 1.
|
|
15987
|
+
// version: 1.156.1-7842b5df6
|
package/package.json
CHANGED
package/sfdc/main.js
CHANGED
|
@@ -4053,38 +4053,32 @@ function recordQuery(selection, apiName, alias, predicates, input) {
|
|
|
4053
4053
|
const draftsField = { type: FieldType.Scalar, extract, path: 'node._drafts' };
|
|
4054
4054
|
const idExtract = { type: ValueType.Extract, jsonAlias: alias, field: 'Id' };
|
|
4055
4055
|
const idField = { type: FieldType.Scalar, extract: idExtract, path: 'node.Id' };
|
|
4056
|
-
// When the exclude stale records gate is open
|
|
4057
|
-
//
|
|
4058
|
-
//
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
const
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
predicates.push({
|
|
4083
|
-
type: PredicateType$1.compound,
|
|
4084
|
-
operator: CompoundOperator.or,
|
|
4085
|
-
children: [timestampCheck, isDraft],
|
|
4086
|
-
});
|
|
4087
|
-
}
|
|
4056
|
+
// When the exclude stale records gate is open and there is a root timestamp
|
|
4057
|
+
// in the parser input, inject an additional predicate to limit the search
|
|
4058
|
+
// to records that either have drafts associated to them or were ingested at
|
|
4059
|
+
// least as recently as the query.
|
|
4060
|
+
if (excludeStaleRecordsGate.isOpen({ fallback: false }) && input.rootTimestamp !== undefined) {
|
|
4061
|
+
const timestampCheck = {
|
|
4062
|
+
type: PredicateType$1.comparison,
|
|
4063
|
+
left: {
|
|
4064
|
+
type: ValueType.Extract,
|
|
4065
|
+
jsonAlias: alias,
|
|
4066
|
+
field: 'ingestionTimestamp',
|
|
4067
|
+
metadata: true,
|
|
4068
|
+
},
|
|
4069
|
+
operator: ComparisonOperator.gte,
|
|
4070
|
+
right: { type: ValueType.IntLiteral, value: input.rootTimestamp },
|
|
4071
|
+
};
|
|
4072
|
+
const isDraft = {
|
|
4073
|
+
type: PredicateType$1.nullComparison,
|
|
4074
|
+
left: { type: ValueType.Extract, jsonAlias: alias, field: 'drafts' },
|
|
4075
|
+
operator: NullComparisonOperator.isNot,
|
|
4076
|
+
};
|
|
4077
|
+
predicates.push({
|
|
4078
|
+
type: PredicateType$1.compound,
|
|
4079
|
+
operator: CompoundOperator.or,
|
|
4080
|
+
children: [timestampCheck, isDraft],
|
|
4081
|
+
});
|
|
4088
4082
|
}
|
|
4089
4083
|
return queryContainer(internalFields, alias, apiName, predicates).map((result) => {
|
|
4090
4084
|
const { fields, predicates } = result;
|
|
@@ -4134,6 +4128,20 @@ function rootRecordQuery(selection, input) {
|
|
|
4134
4128
|
if (input.objectInfoMap[alias] === undefined) {
|
|
4135
4129
|
return failure([missingObjectInfo(apiName)]);
|
|
4136
4130
|
}
|
|
4131
|
+
// When the exclude stale records gate is open and the query has an
|
|
4132
|
+
// ingestion timestamp in its cache metadata, associate that with the input
|
|
4133
|
+
// so it can later be used to limit the search to records were ingested at
|
|
4134
|
+
// least as recently as the query.
|
|
4135
|
+
if (excludeStaleRecordsGate.isOpen({ fallback: false })) {
|
|
4136
|
+
const key = input.connectionKeyBuilder(selection, input.config.variables);
|
|
4137
|
+
const queryMetadata = input.metadata[key];
|
|
4138
|
+
// If there is no metadata for this query or it somehow lacks a timestamp
|
|
4139
|
+
// skip setting the root timestamp
|
|
4140
|
+
if (queryMetadata !== undefined && queryMetadata.ingestionTimestamp !== undefined) {
|
|
4141
|
+
// subtract 10ms from timestamp to account for ingestion processing time
|
|
4142
|
+
input.rootTimestamp = queryMetadata.ingestionTimestamp - 10;
|
|
4143
|
+
}
|
|
4144
|
+
}
|
|
4137
4145
|
return recordQuery(selection, alias, apiName, [], input);
|
|
4138
4146
|
}
|
|
4139
4147
|
function rootQuery(recordNodes, input) {
|
|
@@ -15976,4 +15984,4 @@ register({
|
|
|
15976
15984
|
});
|
|
15977
15985
|
|
|
15978
15986
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15979
|
-
// version: 1.
|
|
15987
|
+
// version: 1.156.1-7842b5df6
|