@salesforce/lds-worker-api 1.121.0 → 1.122.0
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.
|
@@ -751,4 +751,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
754
|
-
// version: 1.
|
|
754
|
+
// version: 1.122.0-aa6cc75e0
|
|
@@ -3776,7 +3776,7 @@ function withDefaultLuvio(callback) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
callbacks.push(callback);
|
|
3778
3778
|
}
|
|
3779
|
-
// version: 1.
|
|
3779
|
+
// version: 1.122.0-aa6cc75e0
|
|
3780
3780
|
|
|
3781
3781
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3782
3782
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15200,7 +15200,7 @@ function parseAndVisit(source) {
|
|
|
15200
15200
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15201
15201
|
return luvioDocumentNode;
|
|
15202
15202
|
}
|
|
15203
|
-
// version: 1.
|
|
15203
|
+
// version: 1.122.0-aa6cc75e0
|
|
15204
15204
|
|
|
15205
15205
|
function unwrap(data) {
|
|
15206
15206
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16113,7 +16113,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16113
16113
|
const { apiFamily, name } = metadata;
|
|
16114
16114
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16115
16115
|
}
|
|
16116
|
-
// version: 1.
|
|
16116
|
+
// version: 1.122.0-aa6cc75e0
|
|
16117
16117
|
|
|
16118
16118
|
/**
|
|
16119
16119
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44347,7 +44347,7 @@ withDefaultLuvio((luvio) => {
|
|
|
44347
44347
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44348
44348
|
});
|
|
44349
44349
|
});
|
|
44350
|
-
// version: 1.
|
|
44350
|
+
// version: 1.122.0-5bf1b3ee2
|
|
44351
44351
|
|
|
44352
44352
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44353
44353
|
|
|
@@ -50726,7 +50726,7 @@ function recordLoaderFactory(query) {
|
|
|
50726
50726
|
return new DataLoader(batchRecordQuery);
|
|
50727
50727
|
}
|
|
50728
50728
|
|
|
50729
|
-
function createContext(store, objectInfos, eventEmitter, settings, snapshot) {
|
|
50729
|
+
function createContext(store, objectInfos, eventEmitter, settings, snapshot, draftFunctions) {
|
|
50730
50730
|
store.query.bind(store);
|
|
50731
50731
|
const query = (sql, params) => {
|
|
50732
50732
|
const now = Date.now();
|
|
@@ -50753,6 +50753,7 @@ function createContext(store, objectInfos, eventEmitter, settings, snapshot) {
|
|
|
50753
50753
|
Record,
|
|
50754
50754
|
snapshot,
|
|
50755
50755
|
seenRecordIds: new Set(),
|
|
50756
|
+
draftFunctions,
|
|
50756
50757
|
};
|
|
50757
50758
|
}
|
|
50758
50759
|
|
|
@@ -51138,7 +51139,7 @@ function dateTimeRange(input, op, field, alias) {
|
|
|
51138
51139
|
}
|
|
51139
51140
|
|
|
51140
51141
|
const MultiPickListValueSeparator = ';';
|
|
51141
|
-
function filterToPredicates(where, recordType, alias, objectInfoMap, joins) {
|
|
51142
|
+
function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draftFunctions) {
|
|
51142
51143
|
if (!where)
|
|
51143
51144
|
return [];
|
|
51144
51145
|
let predicates = [];
|
|
@@ -51220,38 +51221,52 @@ function filterToPredicates(where, recordType, alias, objectInfoMap, joins) {
|
|
|
51220
51221
|
}
|
|
51221
51222
|
}
|
|
51222
51223
|
else {
|
|
51224
|
+
//`field` match the filedInfo's apiName
|
|
51223
51225
|
for (const [op, value] of entries$2(where[field])) {
|
|
51224
51226
|
const operator = operatorToSql(op);
|
|
51225
|
-
|
|
51226
|
-
|
|
51227
|
+
/**
|
|
51228
|
+
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
51229
|
+
1. Coercing is needed when query is executed against local db if field is Id field of entity or a reference to an entity. It is OK to use 15 char ID to query agaist server,
|
|
51230
|
+
so there is no need to coerce the ID in injected AST which is used by luvio to do the network request when necessary.
|
|
51231
|
+
2. Draft ID swapping is needed when adapter rebuild is triggered. Draft ID swapping also happens in field injection phase when adapter call is invoked. The injected AST node has
|
|
51232
|
+
the canonical ID and is passed to Luvio
|
|
51233
|
+
*/
|
|
51234
|
+
const idProcessingNeeded = isIDValueField(fieldInfo);
|
|
51227
51235
|
const makePredicate = fieldInfo.dataType === 'MultiPicklist'
|
|
51228
51236
|
? createMultiPicklistPredicate
|
|
51229
51237
|
: createSinglePredicate;
|
|
51230
|
-
predicates.push(makePredicate(
|
|
51238
|
+
predicates.push(makePredicate(idProcessingNeeded
|
|
51239
|
+
? sanitizePredicateIDValue(value, draftFunctions)
|
|
51240
|
+
: value, operator, fieldInfo, alias));
|
|
51231
51241
|
}
|
|
51232
51242
|
}
|
|
51233
51243
|
}
|
|
51234
51244
|
return predicates;
|
|
51235
51245
|
}
|
|
51236
51246
|
/**
|
|
51237
|
-
*
|
|
51238
|
-
* so there is no need to coerce the ID in injected AST which is used by luvio to do the network request when necessary.
|
|
51247
|
+
*
|
|
51239
51248
|
* @param fieldInfo
|
|
51240
|
-
* @
|
|
51241
|
-
* @returns true if coerce is needed
|
|
51249
|
+
* @returns true if field is of IDValue type
|
|
51242
51250
|
*/
|
|
51243
|
-
function
|
|
51244
|
-
return
|
|
51245
|
-
(fieldInfo.apiName === fieldName && fieldInfo.referenceToInfos.length > 0)) &&
|
|
51246
|
-
(op === 'eq' || op === 'ne' || op === 'in' || op === 'nin'));
|
|
51251
|
+
function isIDValueField(fieldInfo) {
|
|
51252
|
+
return fieldInfo.apiName === 'Id' || fieldInfo.referenceToInfos.length > 0;
|
|
51247
51253
|
}
|
|
51248
|
-
|
|
51254
|
+
/**
|
|
51255
|
+
* Coerces and swaps ID if it is a draft ID.
|
|
51256
|
+
* @param value Predicate value which might be a string value like 'John' or a List like ['Acme', 'John']
|
|
51257
|
+
* @param draftFunction optional. If undefined, draft ID swapping does not happen
|
|
51258
|
+
* @returns sanitized previdicate value
|
|
51259
|
+
*/
|
|
51260
|
+
function sanitizePredicateIDValue(value, draftFunction) {
|
|
51249
51261
|
if (isArray$2(value)) {
|
|
51250
|
-
return value.map(
|
|
51262
|
+
return value.map((singleValue) => sanitizePredicateIDValue(singleValue, draftFunction));
|
|
51251
51263
|
}
|
|
51252
51264
|
else {
|
|
51253
51265
|
const coercedId = getRecordId18(value);
|
|
51254
51266
|
if (coercedId !== undefined) {
|
|
51267
|
+
if (draftFunction !== undefined && draftFunction.isDraftId(coercedId)) {
|
|
51268
|
+
return draftFunction.getCanonicalId(coercedId);
|
|
51269
|
+
}
|
|
51255
51270
|
return coercedId;
|
|
51256
51271
|
}
|
|
51257
51272
|
return value;
|
|
@@ -52667,7 +52682,7 @@ function addResolversToSchema(schema, polyFields) {
|
|
|
52667
52682
|
}
|
|
52668
52683
|
async function connectionEdgeResolver(obj, _args, context) {
|
|
52669
52684
|
const { parentArgs = {}, parentRecord, currentFieldName } = obj;
|
|
52670
|
-
const { query, objectInfos } = context;
|
|
52685
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
52671
52686
|
let joins = [];
|
|
52672
52687
|
let alias = currentFieldName;
|
|
52673
52688
|
let childRelationshipFieldName = undefined;
|
|
@@ -52684,7 +52699,7 @@ async function connectionEdgeResolver(obj, _args, context) {
|
|
|
52684
52699
|
}
|
|
52685
52700
|
// Alias starts as entity's ApiName
|
|
52686
52701
|
const predicates = [
|
|
52687
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins),
|
|
52702
|
+
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
52688
52703
|
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
52689
52704
|
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
52690
52705
|
];
|
|
@@ -53246,7 +53261,7 @@ function createSchema(objectInfos) {
|
|
|
53246
53261
|
return addResolversToSchema(schema, polyFieldTypeNames);
|
|
53247
53262
|
}
|
|
53248
53263
|
|
|
53249
|
-
async function evaluate(config, observers, settings, objectInfos, store, snapshot) {
|
|
53264
|
+
async function evaluate(config, observers, settings, objectInfos, store, snapshot, draftFunctions) {
|
|
53250
53265
|
const eventEmitter = createCustomAdapterEventEmitter(GRAPHQL_EVAL_NAMESPACE, observers);
|
|
53251
53266
|
// this is only wrapped in a try to execute the event after the result was returned
|
|
53252
53267
|
try {
|
|
@@ -53279,7 +53294,7 @@ async function evaluate(config, observers, settings, objectInfos, store, snapsho
|
|
|
53279
53294
|
eventEmitter({ type: 'graphql-preconditions-met' });
|
|
53280
53295
|
// create the resolver request context, runtime values and functions for
|
|
53281
53296
|
// resolvers to do their job.
|
|
53282
|
-
const contextValue = createContext(store, objectInfos, eventEmitter, settings, snapshot);
|
|
53297
|
+
const contextValue = createContext(store, objectInfos, eventEmitter, settings, snapshot, draftFunctions);
|
|
53283
53298
|
// We're building this from scratch from each request. If this becomes a
|
|
53284
53299
|
// hotspot we can pull it up and memoize it later
|
|
53285
53300
|
const schema = createSchema(objectInfos);
|
|
@@ -56605,11 +56620,11 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
56605
56620
|
let internalRequestContext = {
|
|
56606
56621
|
...requestContext,
|
|
56607
56622
|
};
|
|
56623
|
+
const draftFunctions = {
|
|
56624
|
+
isDraftId,
|
|
56625
|
+
getCanonicalId,
|
|
56626
|
+
};
|
|
56608
56627
|
try {
|
|
56609
|
-
const draftFunctions = {
|
|
56610
|
-
isDraftId,
|
|
56611
|
-
getCanonicalId,
|
|
56612
|
-
};
|
|
56613
56628
|
({
|
|
56614
56629
|
modifiedAST: injectedAST,
|
|
56615
56630
|
objectInfos: objectInfoNeeded,
|
|
@@ -56692,7 +56707,7 @@ function draftAwareGraphQLAdapterFactory(userId, objectInfoService, store, luvio
|
|
|
56692
56707
|
let { result: rebuildResult, seenRecordIds } = await evaluate({
|
|
56693
56708
|
...config,
|
|
56694
56709
|
query: injectedAST,
|
|
56695
|
-
}, observers, { userId }, objectInfoNeeded, store, originalSnapshot);
|
|
56710
|
+
}, observers, { userId }, objectInfoNeeded, store, originalSnapshot, draftFunctions);
|
|
56696
56711
|
if (!rebuildResult.errors) {
|
|
56697
56712
|
rebuildResult = removeSyntheticFields(rebuildResult, config.query);
|
|
56698
56713
|
}
|
|
@@ -59862,7 +59877,7 @@ register({
|
|
|
59862
59877
|
id: '@salesforce/lds-network-adapter',
|
|
59863
59878
|
instrument: instrument$1,
|
|
59864
59879
|
});
|
|
59865
|
-
// version: 1.
|
|
59880
|
+
// version: 1.122.0-aa6cc75e0
|
|
59866
59881
|
|
|
59867
59882
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59868
59883
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -74127,7 +74142,7 @@ register({
|
|
|
74127
74142
|
configuration: { ...configurationForGraphQLAdapters },
|
|
74128
74143
|
instrument,
|
|
74129
74144
|
});
|
|
74130
|
-
// version: 1.
|
|
74145
|
+
// version: 1.122.0-5bf1b3ee2
|
|
74131
74146
|
|
|
74132
74147
|
// On core the unstable adapters are re-exported with different names,
|
|
74133
74148
|
|
|
@@ -76256,7 +76271,7 @@ withDefaultLuvio((luvio) => {
|
|
|
76256
76271
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
76257
76272
|
graphQLImperative = ldsAdapter;
|
|
76258
76273
|
});
|
|
76259
|
-
// version: 1.
|
|
76274
|
+
// version: 1.122.0-5bf1b3ee2
|
|
76260
76275
|
|
|
76261
76276
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
76262
76277
|
__proto__: null,
|
|
@@ -76938,4 +76953,4 @@ const { luvio } = getRuntime();
|
|
|
76938
76953
|
setDefaultLuvio({ luvio });
|
|
76939
76954
|
|
|
76940
76955
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
76941
|
-
// version: 1.
|
|
76956
|
+
// version: 1.122.0-aa6cc75e0
|
|
@@ -3782,7 +3782,7 @@
|
|
|
3782
3782
|
}
|
|
3783
3783
|
callbacks.push(callback);
|
|
3784
3784
|
}
|
|
3785
|
-
// version: 1.
|
|
3785
|
+
// version: 1.122.0-aa6cc75e0
|
|
3786
3786
|
|
|
3787
3787
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
3788
3788
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15206,7 +15206,7 @@
|
|
|
15206
15206
|
updateReferenceMapWithKnownKey(ast, luvioDocumentNode);
|
|
15207
15207
|
return luvioDocumentNode;
|
|
15208
15208
|
}
|
|
15209
|
-
// version: 1.
|
|
15209
|
+
// version: 1.122.0-aa6cc75e0
|
|
15210
15210
|
|
|
15211
15211
|
function unwrap(data) {
|
|
15212
15212
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16119,7 +16119,7 @@
|
|
|
16119
16119
|
const { apiFamily, name } = metadata;
|
|
16120
16120
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16121
16121
|
}
|
|
16122
|
-
// version: 1.
|
|
16122
|
+
// version: 1.122.0-aa6cc75e0
|
|
16123
16123
|
|
|
16124
16124
|
/**
|
|
16125
16125
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -44353,7 +44353,7 @@
|
|
|
44353
44353
|
dropFunction: instrumentation$2.notifyRecordUpdateAvailableDropped,
|
|
44354
44354
|
});
|
|
44355
44355
|
});
|
|
44356
|
-
// version: 1.
|
|
44356
|
+
// version: 1.122.0-5bf1b3ee2
|
|
44357
44357
|
|
|
44358
44358
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
44359
44359
|
|
|
@@ -50732,7 +50732,7 @@
|
|
|
50732
50732
|
return new DataLoader(batchRecordQuery);
|
|
50733
50733
|
}
|
|
50734
50734
|
|
|
50735
|
-
function createContext(store, objectInfos, eventEmitter, settings, snapshot) {
|
|
50735
|
+
function createContext(store, objectInfos, eventEmitter, settings, snapshot, draftFunctions) {
|
|
50736
50736
|
store.query.bind(store);
|
|
50737
50737
|
const query = (sql, params) => {
|
|
50738
50738
|
const now = Date.now();
|
|
@@ -50759,6 +50759,7 @@
|
|
|
50759
50759
|
Record,
|
|
50760
50760
|
snapshot,
|
|
50761
50761
|
seenRecordIds: new Set(),
|
|
50762
|
+
draftFunctions,
|
|
50762
50763
|
};
|
|
50763
50764
|
}
|
|
50764
50765
|
|
|
@@ -51144,7 +51145,7 @@
|
|
|
51144
51145
|
}
|
|
51145
51146
|
|
|
51146
51147
|
const MultiPickListValueSeparator = ';';
|
|
51147
|
-
function filterToPredicates(where, recordType, alias, objectInfoMap, joins) {
|
|
51148
|
+
function filterToPredicates(where, recordType, alias, objectInfoMap, joins, draftFunctions) {
|
|
51148
51149
|
if (!where)
|
|
51149
51150
|
return [];
|
|
51150
51151
|
let predicates = [];
|
|
@@ -51226,38 +51227,52 @@
|
|
|
51226
51227
|
}
|
|
51227
51228
|
}
|
|
51228
51229
|
else {
|
|
51230
|
+
//`field` match the filedInfo's apiName
|
|
51229
51231
|
for (const [op, value] of entries$2(where[field])) {
|
|
51230
51232
|
const operator = operatorToSql(op);
|
|
51231
|
-
|
|
51232
|
-
|
|
51233
|
+
/**
|
|
51234
|
+
Two types ID processing might be needed. Draft ID swapping is optional, which depends on DraftFunctions existence.
|
|
51235
|
+
1. Coercing is needed when query is executed against local db if field is Id field of entity or a reference to an entity. It is OK to use 15 char ID to query agaist server,
|
|
51236
|
+
so there is no need to coerce the ID in injected AST which is used by luvio to do the network request when necessary.
|
|
51237
|
+
2. Draft ID swapping is needed when adapter rebuild is triggered. Draft ID swapping also happens in field injection phase when adapter call is invoked. The injected AST node has
|
|
51238
|
+
the canonical ID and is passed to Luvio
|
|
51239
|
+
*/
|
|
51240
|
+
const idProcessingNeeded = isIDValueField(fieldInfo);
|
|
51233
51241
|
const makePredicate = fieldInfo.dataType === 'MultiPicklist'
|
|
51234
51242
|
? createMultiPicklistPredicate
|
|
51235
51243
|
: createSinglePredicate;
|
|
51236
|
-
predicates.push(makePredicate(
|
|
51244
|
+
predicates.push(makePredicate(idProcessingNeeded
|
|
51245
|
+
? sanitizePredicateIDValue(value, draftFunctions)
|
|
51246
|
+
: value, operator, fieldInfo, alias));
|
|
51237
51247
|
}
|
|
51238
51248
|
}
|
|
51239
51249
|
}
|
|
51240
51250
|
return predicates;
|
|
51241
51251
|
}
|
|
51242
51252
|
/**
|
|
51243
|
-
*
|
|
51244
|
-
* so there is no need to coerce the ID in injected AST which is used by luvio to do the network request when necessary.
|
|
51253
|
+
*
|
|
51245
51254
|
* @param fieldInfo
|
|
51246
|
-
* @
|
|
51247
|
-
* @returns true if coerce is needed
|
|
51255
|
+
* @returns true if field is of IDValue type
|
|
51248
51256
|
*/
|
|
51249
|
-
function
|
|
51250
|
-
return
|
|
51251
|
-
(fieldInfo.apiName === fieldName && fieldInfo.referenceToInfos.length > 0)) &&
|
|
51252
|
-
(op === 'eq' || op === 'ne' || op === 'in' || op === 'nin'));
|
|
51257
|
+
function isIDValueField(fieldInfo) {
|
|
51258
|
+
return fieldInfo.apiName === 'Id' || fieldInfo.referenceToInfos.length > 0;
|
|
51253
51259
|
}
|
|
51254
|
-
|
|
51260
|
+
/**
|
|
51261
|
+
* Coerces and swaps ID if it is a draft ID.
|
|
51262
|
+
* @param value Predicate value which might be a string value like 'John' or a List like ['Acme', 'John']
|
|
51263
|
+
* @param draftFunction optional. If undefined, draft ID swapping does not happen
|
|
51264
|
+
* @returns sanitized previdicate value
|
|
51265
|
+
*/
|
|
51266
|
+
function sanitizePredicateIDValue(value, draftFunction) {
|
|
51255
51267
|
if (isArray$2(value)) {
|
|
51256
|
-
return value.map(
|
|
51268
|
+
return value.map((singleValue) => sanitizePredicateIDValue(singleValue, draftFunction));
|
|
51257
51269
|
}
|
|
51258
51270
|
else {
|
|
51259
51271
|
const coercedId = getRecordId18(value);
|
|
51260
51272
|
if (coercedId !== undefined) {
|
|
51273
|
+
if (draftFunction !== undefined && draftFunction.isDraftId(coercedId)) {
|
|
51274
|
+
return draftFunction.getCanonicalId(coercedId);
|
|
51275
|
+
}
|
|
51261
51276
|
return coercedId;
|
|
51262
51277
|
}
|
|
51263
51278
|
return value;
|
|
@@ -52673,7 +52688,7 @@
|
|
|
52673
52688
|
}
|
|
52674
52689
|
async function connectionEdgeResolver(obj, _args, context) {
|
|
52675
52690
|
const { parentArgs = {}, parentRecord, currentFieldName } = obj;
|
|
52676
|
-
const { query, objectInfos } = context;
|
|
52691
|
+
const { query, objectInfos, draftFunctions } = context;
|
|
52677
52692
|
let joins = [];
|
|
52678
52693
|
let alias = currentFieldName;
|
|
52679
52694
|
let childRelationshipFieldName = undefined;
|
|
@@ -52690,7 +52705,7 @@
|
|
|
52690
52705
|
}
|
|
52691
52706
|
// Alias starts as entity's ApiName
|
|
52692
52707
|
const predicates = [
|
|
52693
|
-
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins),
|
|
52708
|
+
...filterToPredicates(parentArgs.where, alias, alias, context.objectInfos, joins, draftFunctions),
|
|
52694
52709
|
...scopeToPredicates(parentArgs.scope, context.settings),
|
|
52695
52710
|
...childRelationshipToPredicates(childRelationshipFieldName, parentRecord.id),
|
|
52696
52711
|
];
|
|
@@ -53252,7 +53267,7 @@
|
|
|
53252
53267
|
return addResolversToSchema(schema, polyFieldTypeNames);
|
|
53253
53268
|
}
|
|
53254
53269
|
|
|
53255
|
-
async function evaluate(config, observers, settings, objectInfos, store, snapshot) {
|
|
53270
|
+
async function evaluate(config, observers, settings, objectInfos, store, snapshot, draftFunctions) {
|
|
53256
53271
|
const eventEmitter = createCustomAdapterEventEmitter(GRAPHQL_EVAL_NAMESPACE, observers);
|
|
53257
53272
|
// this is only wrapped in a try to execute the event after the result was returned
|
|
53258
53273
|
try {
|
|
@@ -53285,7 +53300,7 @@
|
|
|
53285
53300
|
eventEmitter({ type: 'graphql-preconditions-met' });
|
|
53286
53301
|
// create the resolver request context, runtime values and functions for
|
|
53287
53302
|
// resolvers to do their job.
|
|
53288
|
-
const contextValue = createContext(store, objectInfos, eventEmitter, settings, snapshot);
|
|
53303
|
+
const contextValue = createContext(store, objectInfos, eventEmitter, settings, snapshot, draftFunctions);
|
|
53289
53304
|
// We're building this from scratch from each request. If this becomes a
|
|
53290
53305
|
// hotspot we can pull it up and memoize it later
|
|
53291
53306
|
const schema = createSchema(objectInfos);
|
|
@@ -56611,11 +56626,11 @@
|
|
|
56611
56626
|
let internalRequestContext = {
|
|
56612
56627
|
...requestContext,
|
|
56613
56628
|
};
|
|
56629
|
+
const draftFunctions = {
|
|
56630
|
+
isDraftId,
|
|
56631
|
+
getCanonicalId,
|
|
56632
|
+
};
|
|
56614
56633
|
try {
|
|
56615
|
-
const draftFunctions = {
|
|
56616
|
-
isDraftId,
|
|
56617
|
-
getCanonicalId,
|
|
56618
|
-
};
|
|
56619
56634
|
({
|
|
56620
56635
|
modifiedAST: injectedAST,
|
|
56621
56636
|
objectInfos: objectInfoNeeded,
|
|
@@ -56698,7 +56713,7 @@
|
|
|
56698
56713
|
let { result: rebuildResult, seenRecordIds } = await evaluate({
|
|
56699
56714
|
...config,
|
|
56700
56715
|
query: injectedAST,
|
|
56701
|
-
}, observers, { userId }, objectInfoNeeded, store, originalSnapshot);
|
|
56716
|
+
}, observers, { userId }, objectInfoNeeded, store, originalSnapshot, draftFunctions);
|
|
56702
56717
|
if (!rebuildResult.errors) {
|
|
56703
56718
|
rebuildResult = removeSyntheticFields(rebuildResult, config.query);
|
|
56704
56719
|
}
|
|
@@ -59868,7 +59883,7 @@
|
|
|
59868
59883
|
id: '@salesforce/lds-network-adapter',
|
|
59869
59884
|
instrument: instrument$1,
|
|
59870
59885
|
});
|
|
59871
|
-
// version: 1.
|
|
59886
|
+
// version: 1.122.0-aa6cc75e0
|
|
59872
59887
|
|
|
59873
59888
|
const { create: create$2, keys: keys$2 } = Object;
|
|
59874
59889
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -74133,7 +74148,7 @@
|
|
|
74133
74148
|
configuration: { ...configurationForGraphQLAdapters },
|
|
74134
74149
|
instrument,
|
|
74135
74150
|
});
|
|
74136
|
-
// version: 1.
|
|
74151
|
+
// version: 1.122.0-5bf1b3ee2
|
|
74137
74152
|
|
|
74138
74153
|
// On core the unstable adapters are re-exported with different names,
|
|
74139
74154
|
|
|
@@ -76262,7 +76277,7 @@
|
|
|
76262
76277
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
76263
76278
|
graphQLImperative = ldsAdapter;
|
|
76264
76279
|
});
|
|
76265
|
-
// version: 1.
|
|
76280
|
+
// version: 1.122.0-5bf1b3ee2
|
|
76266
76281
|
|
|
76267
76282
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
76268
76283
|
__proto__: null,
|
|
@@ -76961,4 +76976,4 @@
|
|
|
76961
76976
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
76962
76977
|
|
|
76963
76978
|
}));
|
|
76964
|
-
// version: 1.
|
|
76979
|
+
// version: 1.122.0-aa6cc75e0
|