@salesforce/lds-adapters-uiapi 1.142.0 → 1.143.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.
|
@@ -5,9 +5,9 @@ import { PartialInterface as graphql_types_Query_PartialInterface } from '../gra
|
|
|
5
5
|
export declare const TTL = 900000;
|
|
6
6
|
export declare const VERSION = "b440235e7e724631f92002fe50e3e096";
|
|
7
7
|
export declare const RepresentationType: string;
|
|
8
|
-
export declare function select(luvio: $64$luvio_engine_Luvio,
|
|
9
|
-
export declare const ingest: (
|
|
10
|
-
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio,
|
|
8
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, document: $64$luvio_graphql$45$parser_DocumentNode, variables: $64$luvio_graphql_GraphQLVariables, operationName?: string): $64$luvio_engine_ReaderFragment;
|
|
9
|
+
export declare const ingest: (document: $64$luvio_graphql$45$parser_DocumentNode, variables: $64$luvio_graphql_GraphQLVariables, operationName?: string) => $64$luvio_engine_ResourceIngest;
|
|
10
|
+
export declare function getTypeCacheKeys(luvio: $64$luvio_engine_Luvio, document: $64$luvio_graphql$45$parser_DocumentNode, variables: $64$luvio_graphql_GraphQLVariables, data: GraphQLRepresentation, operationName?: string): $64$luvio_engine_DurableStoreKeyMetadataMap;
|
|
11
11
|
export type GraphQLRepresentation = GraphQLRepresentationData | GraphQLRepresentationErrors;
|
|
12
12
|
export interface GraphQLRepresentationData {
|
|
13
13
|
data: graphql_types_Query_PartialInterface;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { register } from '@salesforce/lds-default-luvio';
|
|
8
8
|
import { serializeStructuredKey, StoreKeyMap, StoreKeySet, deepFreeze, coerceAdapterRequestContext, Wildcard } from '@luvio/engine';
|
|
9
9
|
import { print, visit, parse as parse$1 } from '@luvio/graphql-parser';
|
|
10
|
-
import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey } from '@luvio/graphql';
|
|
10
|
+
import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey, getOperationFromDocument } from '@luvio/graphql';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Defines configuration for the module with a default value which can be overridden by the runtime environment.
|
|
@@ -50509,43 +50509,38 @@ function getInContextFragmentType(fragment, fragmentMap) {
|
|
|
50509
50509
|
const TTL$5 = 900000;
|
|
50510
50510
|
const VERSION$b = "b440235e7e724631f92002fe50e3e096";
|
|
50511
50511
|
const RepresentationType$c = 'GraphQLRepresentation';
|
|
50512
|
-
function select$8(luvio,
|
|
50513
|
-
const
|
|
50512
|
+
function select$8(luvio, document, variables, operationName) {
|
|
50513
|
+
const operationToExecute = getOperationFromDocument(document, operationName);
|
|
50514
50514
|
return {
|
|
50515
50515
|
kind: 'Fragment',
|
|
50516
50516
|
synthetic: true,
|
|
50517
50517
|
reader: true,
|
|
50518
50518
|
read: (builder) => {
|
|
50519
50519
|
builder.enterPath('data');
|
|
50520
|
-
let sink = {};
|
|
50521
|
-
const fragments = createFragmentMap(query);
|
|
50522
|
-
for (let i = 0, len = definitions.length; i < len; i += 1) {
|
|
50523
|
-
const def = definitions[i];
|
|
50524
|
-
if (def.kind === 'OperationDefinition') {
|
|
50525
|
-
const queryTypeRecordId = keyBuilder$e(luvio, def, variables, fragments);
|
|
50526
|
-
const snapshot = builder.read({
|
|
50527
|
-
recordId: queryTypeRecordId,
|
|
50528
|
-
node: {
|
|
50529
|
-
kind: 'Fragment',
|
|
50530
|
-
private: [],
|
|
50531
|
-
opaque: true,
|
|
50532
|
-
version: VERSION$c
|
|
50533
|
-
},
|
|
50534
|
-
variables: {}
|
|
50535
|
-
});
|
|
50536
|
-
if (snapshot.data === undefined) {
|
|
50537
|
-
builder.markMissingLink(queryTypeRecordId);
|
|
50538
|
-
break;
|
|
50539
|
-
}
|
|
50540
|
-
const data = select$9(def, variables, fragments)(snapshot.data, builder, queryTypeRecordId);
|
|
50541
|
-
sink = {
|
|
50542
|
-
...sink,
|
|
50543
|
-
...data,
|
|
50544
|
-
};
|
|
50545
|
-
}
|
|
50546
|
-
}
|
|
50547
50520
|
const gqlData = {};
|
|
50548
|
-
|
|
50521
|
+
if (operationToExecute === undefined) {
|
|
50522
|
+
builder.markMissing(); // Never give a cache hit for an undefined operation
|
|
50523
|
+
return gqlData;
|
|
50524
|
+
}
|
|
50525
|
+
const fragments = createFragmentMap(document);
|
|
50526
|
+
const queryTypeRecordId = keyBuilder$e(luvio, operationToExecute, variables, fragments);
|
|
50527
|
+
const snapshot = builder.read({
|
|
50528
|
+
recordId: queryTypeRecordId,
|
|
50529
|
+
node: {
|
|
50530
|
+
kind: 'Fragment',
|
|
50531
|
+
private: [],
|
|
50532
|
+
opaque: true,
|
|
50533
|
+
version: VERSION$c
|
|
50534
|
+
},
|
|
50535
|
+
variables: {}
|
|
50536
|
+
});
|
|
50537
|
+
if (snapshot.data === undefined) {
|
|
50538
|
+
builder.markMissingLink(queryTypeRecordId);
|
|
50539
|
+
}
|
|
50540
|
+
else {
|
|
50541
|
+
const data = select$9(operationToExecute, variables, fragments)(snapshot.data, builder, queryTypeRecordId);
|
|
50542
|
+
builder.assignNonScalar(gqlData, 'data', data);
|
|
50543
|
+
}
|
|
50549
50544
|
builder.exitPath();
|
|
50550
50545
|
return gqlData;
|
|
50551
50546
|
}
|
|
@@ -50565,10 +50560,10 @@ function ingestOperationNode(luvio, input, node, state) {
|
|
|
50565
50560
|
});
|
|
50566
50561
|
}
|
|
50567
50562
|
}
|
|
50568
|
-
const ingest$7 = function GraphQLRepresentationIngest(
|
|
50563
|
+
const ingest$7 = function GraphQLRepresentationIngest(document, variables, operationName) {
|
|
50569
50564
|
return (input, path, luvio, store, timestamp) => {
|
|
50570
50565
|
if (input.data) {
|
|
50571
|
-
const fragments = createFragmentMap(
|
|
50566
|
+
const fragments = createFragmentMap(document);
|
|
50572
50567
|
const state = {
|
|
50573
50568
|
data: input.data,
|
|
50574
50569
|
luvio,
|
|
@@ -50578,58 +50573,63 @@ const ingest$7 = function GraphQLRepresentationIngest(query, variables) {
|
|
|
50578
50573
|
variables,
|
|
50579
50574
|
fragments,
|
|
50580
50575
|
};
|
|
50581
|
-
|
|
50582
|
-
|
|
50583
|
-
|
|
50584
|
-
|
|
50585
|
-
});
|
|
50576
|
+
const operationToExecute = getOperationFromDocument(document, operationName);
|
|
50577
|
+
if (operationToExecute !== undefined) {
|
|
50578
|
+
ingestOperationNode(luvio, input, operationToExecute, state);
|
|
50579
|
+
}
|
|
50586
50580
|
}
|
|
50587
50581
|
return {
|
|
50588
50582
|
__ref: undefined
|
|
50589
50583
|
};
|
|
50590
50584
|
};
|
|
50591
50585
|
};
|
|
50592
|
-
function getTypeCacheKeys$8(luvio,
|
|
50586
|
+
function getTypeCacheKeys$8(luvio, document, variables, data, operationName) {
|
|
50593
50587
|
const sink = new StoreKeyMap();
|
|
50594
50588
|
if (data.data) {
|
|
50595
|
-
const fragments = createFragmentMap(
|
|
50596
|
-
|
|
50597
|
-
|
|
50598
|
-
|
|
50599
|
-
|
|
50600
|
-
|
|
50601
|
-
|
|
50602
|
-
|
|
50603
|
-
|
|
50604
|
-
|
|
50605
|
-
|
|
50606
|
-
|
|
50607
|
-
|
|
50608
|
-
|
|
50609
|
-
|
|
50610
|
-
|
|
50611
|
-
});
|
|
50589
|
+
const fragments = createFragmentMap(document);
|
|
50590
|
+
const operationToExecute = getOperationFromDocument(document, operationName);
|
|
50591
|
+
if (operationToExecute !== undefined) {
|
|
50592
|
+
const state = {
|
|
50593
|
+
luvio,
|
|
50594
|
+
variables,
|
|
50595
|
+
fragments,
|
|
50596
|
+
data: data.data,
|
|
50597
|
+
path: {
|
|
50598
|
+
parent: null,
|
|
50599
|
+
propertyName: null,
|
|
50600
|
+
fullPath: '' // TODO: W-13079691 - Need to take another pass at what we want to do for structured keys
|
|
50601
|
+
}
|
|
50602
|
+
};
|
|
50603
|
+
sink.merge(getTypeCacheKeys$9(operationToExecute, state));
|
|
50604
|
+
}
|
|
50612
50605
|
}
|
|
50613
50606
|
return sink;
|
|
50614
50607
|
}
|
|
50615
50608
|
|
|
50616
50609
|
function select$7(luvio, config) {
|
|
50617
|
-
const { query, variables } = config;
|
|
50618
|
-
return select$8(luvio, query, variables);
|
|
50610
|
+
const { query, variables, operationName } = config;
|
|
50611
|
+
return select$8(luvio, query, variables, operationName);
|
|
50619
50612
|
}
|
|
50620
50613
|
function keyBuilder$d(luvio, params) {
|
|
50621
|
-
|
|
50614
|
+
const { query, operationName, variables } = params.body;
|
|
50615
|
+
const operationToExecute = getOperationFromDocument(query, operationName);
|
|
50616
|
+
if (operationToExecute !== undefined) {
|
|
50617
|
+
const fragments = createFragmentMap(query);
|
|
50618
|
+
return keyBuilder$e(luvio, operationToExecute, variables || {}, fragments);
|
|
50619
|
+
}
|
|
50620
|
+
return `adapters_adapter$45$utils_keyPrefix::GraphQLRepresentation::InvalidOperation`;
|
|
50622
50621
|
}
|
|
50623
50622
|
function getResponseCacheKeys$b(luvio, resourceParams, response) {
|
|
50624
50623
|
const query = resourceParams.body.query;
|
|
50625
50624
|
const variables = resourceParams.body.variables || {};
|
|
50626
|
-
|
|
50625
|
+
const operationName = resourceParams.body.operationName;
|
|
50626
|
+
return getTypeCacheKeys$8(luvio, query, variables, response, operationName);
|
|
50627
50627
|
}
|
|
50628
50628
|
function ingestSuccess$5(luvio, config, resourceParams, response, snapshotRefresh) {
|
|
50629
50629
|
const { body } = response;
|
|
50630
|
-
const key = keyBuilder$d();
|
|
50631
|
-
const { query, variables } = resourceParams.body;
|
|
50632
|
-
luvio.storeIngest(key, ingest$7(query, variables), body);
|
|
50630
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
50631
|
+
const { query, variables, operationName } = resourceParams.body;
|
|
50632
|
+
luvio.storeIngest(key, ingest$7(query, variables, operationName), body);
|
|
50633
50633
|
// revert the optimized pagination variables back to its original so that subsequent store lookup will include all records, not just the ones loaded by an optimized query
|
|
50634
50634
|
// see optimizePagination for initial update to optimize the query
|
|
50635
50635
|
revertPaginationOptimization(variables);
|
|
@@ -50646,7 +50646,7 @@ function ingestSuccess$5(luvio, config, resourceParams, response, snapshotRefres
|
|
|
50646
50646
|
return snapshot;
|
|
50647
50647
|
}
|
|
50648
50648
|
function ingestError$2(luvio, config, params, error, snapshotRefresh) {
|
|
50649
|
-
const key = keyBuilder$d();
|
|
50649
|
+
const key = keyBuilder$d(luvio, params);
|
|
50650
50650
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
50651
50651
|
const storeMetadataParams = {
|
|
50652
50652
|
ttl: TTL$5,
|
|
@@ -50775,7 +50775,7 @@ function selectChildResourceParams(luvio, childResources, resourceParams) {
|
|
|
50775
50775
|
reader.enterPath(i);
|
|
50776
50776
|
reader.enterPath(envelopeBodyPath);
|
|
50777
50777
|
const childResource = childResources[i];
|
|
50778
|
-
const childKey = keyBuilder$d();
|
|
50778
|
+
const childKey = keyBuilder$d(luvio, childResource);
|
|
50779
50779
|
const childFragment = select$7(luvio, childResource.body); // MUST read from the ORIGINAL config not injected
|
|
50780
50780
|
const isMissingDataBeforeChildRead = reader.getIsDataMissing();
|
|
50781
50781
|
const childSnapshot = reader.read({
|
|
@@ -50894,7 +50894,7 @@ function getResponseCacheKeys$a(luvio, resourceParams, response) {
|
|
|
50894
50894
|
ObjectAssign(keys, childKeys);
|
|
50895
50895
|
}
|
|
50896
50896
|
else if (childStatusCode === 404) {
|
|
50897
|
-
const childKey = keyBuilder$d();
|
|
50897
|
+
const childKey = keyBuilder$d(luvio, childResourceParams);
|
|
50898
50898
|
keys.set(childKey, {
|
|
50899
50899
|
namespace: keyPrefix,
|
|
50900
50900
|
representationName: RepresentationType$c,
|
|
@@ -50912,7 +50912,7 @@ function ingestSuccessChildResourceParams(luvio, childConfigs, childResourcePara
|
|
|
50912
50912
|
// There's an assumption here that the config and resource params aren't reordered.
|
|
50913
50913
|
const childConfig = childConfigs[index];
|
|
50914
50914
|
const childResourceParams = childResourceParamsArray[index];
|
|
50915
|
-
const childKey = keyBuilder$d();
|
|
50915
|
+
const childKey = keyBuilder$d(luvio, childResourceParams);
|
|
50916
50916
|
const result = childEnvelopes[index];
|
|
50917
50917
|
const { statusCode: childStatusCode, result: childBody } = result;
|
|
50918
50918
|
if (childStatusCode === 200 &&
|
|
@@ -51171,8 +51171,8 @@ function createResourceParams$b(config) {
|
|
|
51171
51171
|
return resourceParams;
|
|
51172
51172
|
}
|
|
51173
51173
|
function keyBuilder$a(luvio, config) {
|
|
51174
|
-
createResourceParams$b(config);
|
|
51175
|
-
return keyBuilder$d();
|
|
51174
|
+
const resourceParams = createResourceParams$b(config);
|
|
51175
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
51176
51176
|
}
|
|
51177
51177
|
function typeCheckConfig$e(untrustedConfig) {
|
|
51178
51178
|
const config = {};
|
package/package.json
CHANGED
package/sfdc/graphqlAdapters.js
CHANGED
|
@@ -16,8 +16,8 @@ import { register, withDefaultLuvio } from 'force/ldsEngine';
|
|
|
16
16
|
import { print, visit, parse, astResolver } from 'force/ldsGraphqlParser';
|
|
17
17
|
import { createInstrumentedAdapter, createLDSAdapter, createGraphQLWireAdapterConstructor, createGraphQLImperativeAdapter } from 'force/ldsBindings';
|
|
18
18
|
export { refresh as refreshGraphQL } from 'force/ldsBindings';
|
|
19
|
+
import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey, getOperationFromDocument } from 'force/luvioGraphql';
|
|
19
20
|
import { serializeStructuredKey, StoreKeyMap, deepFreeze, StoreKeySet } from 'force/luvioEngine';
|
|
20
|
-
import { createFragmentMap, serializeFieldArguments, buildQueryTypeStringKey } from 'force/luvioGraphql';
|
|
21
21
|
import { createIngestRecordWithFields } from 'force/ldsAdaptersUiapi';
|
|
22
22
|
|
|
23
23
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
@@ -19471,43 +19471,38 @@ function getInContextFragmentType(fragment, fragmentMap) {
|
|
|
19471
19471
|
const TTL = 900000;
|
|
19472
19472
|
const VERSION$6 = "b440235e7e724631f92002fe50e3e096";
|
|
19473
19473
|
const RepresentationType = 'GraphQLRepresentation';
|
|
19474
|
-
function select$8(luvio,
|
|
19475
|
-
const
|
|
19474
|
+
function select$8(luvio, document, variables, operationName) {
|
|
19475
|
+
const operationToExecute = getOperationFromDocument(document, operationName);
|
|
19476
19476
|
return {
|
|
19477
19477
|
kind: 'Fragment',
|
|
19478
19478
|
synthetic: true,
|
|
19479
19479
|
reader: true,
|
|
19480
19480
|
read: (builder) => {
|
|
19481
19481
|
builder.enterPath('data');
|
|
19482
|
-
let sink = {};
|
|
19483
|
-
const fragments = createFragmentMap(query);
|
|
19484
|
-
for (let i = 0, len = definitions.length; i < len; i += 1) {
|
|
19485
|
-
const def = definitions[i];
|
|
19486
|
-
if (def.kind === 'OperationDefinition') {
|
|
19487
|
-
const queryTypeRecordId = keyBuilder$4(luvio, def, variables, fragments);
|
|
19488
|
-
const snapshot = builder.read({
|
|
19489
|
-
recordId: queryTypeRecordId,
|
|
19490
|
-
node: {
|
|
19491
|
-
kind: 'Fragment',
|
|
19492
|
-
private: [],
|
|
19493
|
-
opaque: true,
|
|
19494
|
-
version: VERSION$7
|
|
19495
|
-
},
|
|
19496
|
-
variables: {}
|
|
19497
|
-
});
|
|
19498
|
-
if (snapshot.data === undefined) {
|
|
19499
|
-
builder.markMissingLink(queryTypeRecordId);
|
|
19500
|
-
break;
|
|
19501
|
-
}
|
|
19502
|
-
const data = select$9(def, variables, fragments)(snapshot.data, builder, queryTypeRecordId);
|
|
19503
|
-
sink = {
|
|
19504
|
-
...sink,
|
|
19505
|
-
...data,
|
|
19506
|
-
};
|
|
19507
|
-
}
|
|
19508
|
-
}
|
|
19509
19482
|
const gqlData = {};
|
|
19510
|
-
|
|
19483
|
+
if (operationToExecute === undefined) {
|
|
19484
|
+
builder.markMissing(); // Never give a cache hit for an undefined operation
|
|
19485
|
+
return gqlData;
|
|
19486
|
+
}
|
|
19487
|
+
const fragments = createFragmentMap(document);
|
|
19488
|
+
const queryTypeRecordId = keyBuilder$4(luvio, operationToExecute, variables, fragments);
|
|
19489
|
+
const snapshot = builder.read({
|
|
19490
|
+
recordId: queryTypeRecordId,
|
|
19491
|
+
node: {
|
|
19492
|
+
kind: 'Fragment',
|
|
19493
|
+
private: [],
|
|
19494
|
+
opaque: true,
|
|
19495
|
+
version: VERSION$7
|
|
19496
|
+
},
|
|
19497
|
+
variables: {}
|
|
19498
|
+
});
|
|
19499
|
+
if (snapshot.data === undefined) {
|
|
19500
|
+
builder.markMissingLink(queryTypeRecordId);
|
|
19501
|
+
}
|
|
19502
|
+
else {
|
|
19503
|
+
const data = select$9(operationToExecute, variables, fragments)(snapshot.data, builder, queryTypeRecordId);
|
|
19504
|
+
builder.assignNonScalar(gqlData, 'data', data);
|
|
19505
|
+
}
|
|
19511
19506
|
builder.exitPath();
|
|
19512
19507
|
return gqlData;
|
|
19513
19508
|
}
|
|
@@ -19527,10 +19522,10 @@ function ingestOperationNode(luvio, input, node, state) {
|
|
|
19527
19522
|
});
|
|
19528
19523
|
}
|
|
19529
19524
|
}
|
|
19530
|
-
const ingest = function GraphQLRepresentationIngest(
|
|
19525
|
+
const ingest = function GraphQLRepresentationIngest(document, variables, operationName) {
|
|
19531
19526
|
return (input, path, luvio, store, timestamp) => {
|
|
19532
19527
|
if (input.data) {
|
|
19533
|
-
const fragments = createFragmentMap(
|
|
19528
|
+
const fragments = createFragmentMap(document);
|
|
19534
19529
|
const state = {
|
|
19535
19530
|
data: input.data,
|
|
19536
19531
|
luvio,
|
|
@@ -19540,58 +19535,63 @@ const ingest = function GraphQLRepresentationIngest(query, variables) {
|
|
|
19540
19535
|
variables,
|
|
19541
19536
|
fragments,
|
|
19542
19537
|
};
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
});
|
|
19538
|
+
const operationToExecute = getOperationFromDocument(document, operationName);
|
|
19539
|
+
if (operationToExecute !== undefined) {
|
|
19540
|
+
ingestOperationNode(luvio, input, operationToExecute, state);
|
|
19541
|
+
}
|
|
19548
19542
|
}
|
|
19549
19543
|
return {
|
|
19550
19544
|
__ref: undefined
|
|
19551
19545
|
};
|
|
19552
19546
|
};
|
|
19553
19547
|
};
|
|
19554
|
-
function getTypeCacheKeys(luvio,
|
|
19548
|
+
function getTypeCacheKeys(luvio, document, variables, data, operationName) {
|
|
19555
19549
|
const sink = new StoreKeyMap();
|
|
19556
19550
|
if (data.data) {
|
|
19557
|
-
const fragments = createFragmentMap(
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
|
|
19566
|
-
|
|
19567
|
-
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
});
|
|
19551
|
+
const fragments = createFragmentMap(document);
|
|
19552
|
+
const operationToExecute = getOperationFromDocument(document, operationName);
|
|
19553
|
+
if (operationToExecute !== undefined) {
|
|
19554
|
+
const state = {
|
|
19555
|
+
luvio,
|
|
19556
|
+
variables,
|
|
19557
|
+
fragments,
|
|
19558
|
+
data: data.data,
|
|
19559
|
+
path: {
|
|
19560
|
+
parent: null,
|
|
19561
|
+
propertyName: null,
|
|
19562
|
+
fullPath: '' // TODO: W-13079691 - Need to take another pass at what we want to do for structured keys
|
|
19563
|
+
}
|
|
19564
|
+
};
|
|
19565
|
+
sink.merge(getTypeCacheKeys$1(operationToExecute, state));
|
|
19566
|
+
}
|
|
19574
19567
|
}
|
|
19575
19568
|
return sink;
|
|
19576
19569
|
}
|
|
19577
19570
|
|
|
19578
19571
|
function select$7(luvio, config) {
|
|
19579
|
-
const { query, variables } = config;
|
|
19580
|
-
return select$8(luvio, query, variables);
|
|
19572
|
+
const { query, variables, operationName } = config;
|
|
19573
|
+
return select$8(luvio, query, variables, operationName);
|
|
19581
19574
|
}
|
|
19582
19575
|
function keyBuilder$3(luvio, params) {
|
|
19583
|
-
|
|
19576
|
+
const { query, operationName, variables } = params.body;
|
|
19577
|
+
const operationToExecute = getOperationFromDocument(query, operationName);
|
|
19578
|
+
if (operationToExecute !== undefined) {
|
|
19579
|
+
const fragments = createFragmentMap(query);
|
|
19580
|
+
return keyBuilder$4(luvio, operationToExecute, variables || {}, fragments);
|
|
19581
|
+
}
|
|
19582
|
+
return `adapters_adapter$45$utils_keyPrefix::GraphQLRepresentation::InvalidOperation`;
|
|
19584
19583
|
}
|
|
19585
19584
|
function getResponseCacheKeys$1(luvio, resourceParams, response) {
|
|
19586
19585
|
const query = resourceParams.body.query;
|
|
19587
19586
|
const variables = resourceParams.body.variables || {};
|
|
19588
|
-
|
|
19587
|
+
const operationName = resourceParams.body.operationName;
|
|
19588
|
+
return getTypeCacheKeys(luvio, query, variables, response, operationName);
|
|
19589
19589
|
}
|
|
19590
19590
|
function ingestSuccess$1(luvio, config, resourceParams, response, snapshotRefresh) {
|
|
19591
19591
|
const { body } = response;
|
|
19592
|
-
const key = keyBuilder$3();
|
|
19593
|
-
const { query, variables } = resourceParams.body;
|
|
19594
|
-
luvio.storeIngest(key, ingest(query, variables), body);
|
|
19592
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
19593
|
+
const { query, variables, operationName } = resourceParams.body;
|
|
19594
|
+
luvio.storeIngest(key, ingest(query, variables, operationName), body);
|
|
19595
19595
|
// revert the optimized pagination variables back to its original so that subsequent store lookup will include all records, not just the ones loaded by an optimized query
|
|
19596
19596
|
// see optimizePagination for initial update to optimize the query
|
|
19597
19597
|
revertPaginationOptimization(variables);
|
|
@@ -19608,7 +19608,7 @@ function ingestSuccess$1(luvio, config, resourceParams, response, snapshotRefres
|
|
|
19608
19608
|
return snapshot;
|
|
19609
19609
|
}
|
|
19610
19610
|
function ingestError$1(luvio, config, params, error, snapshotRefresh) {
|
|
19611
|
-
const key = keyBuilder$3();
|
|
19611
|
+
const key = keyBuilder$3(luvio, params);
|
|
19612
19612
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
19613
19613
|
const storeMetadataParams = {
|
|
19614
19614
|
ttl: TTL,
|
|
@@ -19691,8 +19691,8 @@ function createResourceParams$1(config) {
|
|
|
19691
19691
|
return resourceParams;
|
|
19692
19692
|
}
|
|
19693
19693
|
function keyBuilder$2(luvio, config) {
|
|
19694
|
-
createResourceParams$1(config);
|
|
19695
|
-
return keyBuilder$3();
|
|
19694
|
+
const resourceParams = createResourceParams$1(config);
|
|
19695
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
19696
19696
|
}
|
|
19697
19697
|
function typeCheckConfig$1(untrustedConfig) {
|
|
19698
19698
|
const config = {};
|
|
@@ -20043,7 +20043,7 @@ function selectChildResourceParams(luvio, childResources, resourceParams) {
|
|
|
20043
20043
|
reader.enterPath(i);
|
|
20044
20044
|
reader.enterPath(envelopeBodyPath);
|
|
20045
20045
|
const childResource = childResources[i];
|
|
20046
|
-
const childKey = keyBuilder$3();
|
|
20046
|
+
const childKey = keyBuilder$3(luvio, childResource);
|
|
20047
20047
|
const childFragment = select$7(luvio, childResource.body); // MUST read from the ORIGINAL config not injected
|
|
20048
20048
|
const isMissingDataBeforeChildRead = reader.getIsDataMissing();
|
|
20049
20049
|
const childSnapshot = reader.read({
|
|
@@ -20162,7 +20162,7 @@ function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
|
20162
20162
|
ObjectAssign(keys, childKeys);
|
|
20163
20163
|
}
|
|
20164
20164
|
else if (childStatusCode === 404) {
|
|
20165
|
-
const childKey = keyBuilder$3();
|
|
20165
|
+
const childKey = keyBuilder$3(luvio, childResourceParams);
|
|
20166
20166
|
keys.set(childKey, {
|
|
20167
20167
|
namespace: keyPrefix,
|
|
20168
20168
|
representationName: RepresentationType,
|
|
@@ -20180,7 +20180,7 @@ function ingestSuccessChildResourceParams(luvio, childConfigs, childResourcePara
|
|
|
20180
20180
|
// There's an assumption here that the config and resource params aren't reordered.
|
|
20181
20181
|
const childConfig = childConfigs[index];
|
|
20182
20182
|
const childResourceParams = childResourceParamsArray[index];
|
|
20183
|
-
const childKey = keyBuilder$3();
|
|
20183
|
+
const childKey = keyBuilder$3(luvio, childResourceParams);
|
|
20184
20184
|
const result = childEnvelopes[index];
|
|
20185
20185
|
const { statusCode: childStatusCode, result: childBody } = result;
|
|
20186
20186
|
if (childStatusCode === 200 &&
|
|
@@ -20811,4 +20811,4 @@ register({
|
|
|
20811
20811
|
});
|
|
20812
20812
|
|
|
20813
20813
|
export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
|
|
20814
|
-
// version: 1.
|
|
20814
|
+
// version: 1.143.0-7a79bacc1
|
package/sfdc/index.js
CHANGED
|
@@ -35769,4 +35769,4 @@ withDefaultLuvio((luvio) => {
|
|
|
35769
35769
|
});
|
|
35770
35770
|
|
|
35771
35771
|
export { InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$I as ObjectInfoRepresentationType, RepresentationType$N as RecordRepresentationRepresentationType, TTL$v as RecordRepresentationTTL, RepresentationType$N as RecordRepresentationType, VERSION$14 as RecordRepresentationVersion, keyPrefix as UiApiNamespace, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createRecord, deleteRecord, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListRecordsByName, getListRecordsByName_imperative, getListUi, getListUi_imperative, getListViewSummaryCollection, getListViewSummaryCollection_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActions_imperative, factory$e as getRecordAdapterFactory, getRecordAvatars, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecords_imperative, getRelatedListActions, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoBatch, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsBatch, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$P as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$B as ingestObjectInfo, ingest$x as ingestQuickActionExecutionRepresentation, ingest$G as ingestRecord, instrument, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$x as keyBuilderFromTypeRecordRepresentation, keyBuilder$1F as keyBuilderObjectInfo, keyBuilder$1z as keyBuilderQuickActionExecutionRepresentation, keyBuilder$1Q as keyBuilderRecord, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, updateLayoutUserState, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
|
|
35772
|
-
// version: 1.
|
|
35772
|
+
// version: 1.143.0-7a79bacc1
|