@wishknish/knishio-client-ts 0.8.0 → 0.8.2
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/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.iife.js +11 -8
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/KnishIOClient.ts +20 -5
- package/src/libraries/GraphQLClient.ts +7 -4
- package/src/query/QueryActiveSession.ts +1 -0
- package/src/types/index.ts +7 -0
package/dist/index.js
CHANGED
|
@@ -5820,14 +5820,14 @@ var GraphQLClient = class {
|
|
|
5820
5820
|
});
|
|
5821
5821
|
}
|
|
5822
5822
|
async query(request) {
|
|
5823
|
-
const { query, variables } = request;
|
|
5824
|
-
const result = await this.$__client.query(query, variables || {}).toPromise();
|
|
5823
|
+
const { query, variables, context } = request;
|
|
5824
|
+
const result = await this.$__client.query(query, variables || {}, context).toPromise();
|
|
5825
5825
|
return this.formatResponse(result);
|
|
5826
5826
|
}
|
|
5827
5827
|
async mutation(request) {
|
|
5828
|
-
const { query, variables } = request;
|
|
5828
|
+
const { query, variables, context } = request;
|
|
5829
5829
|
const mutationString = request.mutation || query;
|
|
5830
|
-
const result = await this.$__client.mutation(mutationString, variables || {}).toPromise();
|
|
5830
|
+
const result = await this.$__client.mutation(mutationString, variables || {}, context).toPromise();
|
|
5831
5831
|
return this.formatResponse(result);
|
|
5832
5832
|
}
|
|
5833
5833
|
// Alias for mutation() to match JS SDK interface
|
|
@@ -8257,6 +8257,7 @@ var QueryActiveSession = class extends Query {
|
|
|
8257
8257
|
metaId
|
|
8258
8258
|
jsonData
|
|
8259
8259
|
createdAt
|
|
8260
|
+
updatedAt
|
|
8260
8261
|
}
|
|
8261
8262
|
}
|
|
8262
8263
|
`;
|
|
@@ -10377,7 +10378,7 @@ var KnishIOClient = class {
|
|
|
10377
10378
|
/**
|
|
10378
10379
|
* Executes a query or mutation
|
|
10379
10380
|
*/
|
|
10380
|
-
async executeQuery(query, variables = null) {
|
|
10381
|
+
async executeQuery(query, variables = null, context = {}) {
|
|
10381
10382
|
if (this.$__authToken && this.$__authToken.isExpired() && !this.$__authInProcess) {
|
|
10382
10383
|
this.log("info", "KnishIOClient::executeQuery() - Access token is expired. Getting new one...");
|
|
10383
10384
|
await this.requestAuthToken({
|
|
@@ -10393,7 +10394,7 @@ var KnishIOClient = class {
|
|
|
10393
10394
|
return response;
|
|
10394
10395
|
});
|
|
10395
10396
|
}
|
|
10396
|
-
return await query.execute({ variables: variables || {} });
|
|
10397
|
+
return await query.execute({ variables: variables || {}, context });
|
|
10397
10398
|
}
|
|
10398
10399
|
/**
|
|
10399
10400
|
* When a ProposeMolecule submission is rejected for a position-related
|
|
@@ -10726,7 +10727,8 @@ var KnishIOClient = class {
|
|
|
10726
10727
|
throughMolecule = false,
|
|
10727
10728
|
values = null,
|
|
10728
10729
|
keys = null,
|
|
10729
|
-
atomValues = null
|
|
10730
|
+
atomValues = null,
|
|
10731
|
+
requestPolicy = null
|
|
10730
10732
|
}) {
|
|
10731
10733
|
this.log("info", `KnishIOClient::queryMeta() - Querying metaType: ${metaType}, metaId: ${metaId}...`);
|
|
10732
10734
|
let query;
|
|
@@ -10778,7 +10780,8 @@ var KnishIOClient = class {
|
|
|
10778
10780
|
cellSlug: this.getCellSlug()
|
|
10779
10781
|
});
|
|
10780
10782
|
}
|
|
10781
|
-
|
|
10783
|
+
const context = requestPolicy ? { requestPolicy } : {};
|
|
10784
|
+
return this.executeQuery(query, variables, context);
|
|
10782
10785
|
}
|
|
10783
10786
|
/**
|
|
10784
10787
|
* Queries meta assets and verifies cryptographic integrity of associated molecules.
|