@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.cjs
CHANGED
|
@@ -5826,14 +5826,14 @@ var GraphQLClient = class {
|
|
|
5826
5826
|
});
|
|
5827
5827
|
}
|
|
5828
5828
|
async query(request) {
|
|
5829
|
-
const { query, variables } = request;
|
|
5830
|
-
const result = await this.$__client.query(query, variables || {}).toPromise();
|
|
5829
|
+
const { query, variables, context } = request;
|
|
5830
|
+
const result = await this.$__client.query(query, variables || {}, context).toPromise();
|
|
5831
5831
|
return this.formatResponse(result);
|
|
5832
5832
|
}
|
|
5833
5833
|
async mutation(request) {
|
|
5834
|
-
const { query, variables } = request;
|
|
5834
|
+
const { query, variables, context } = request;
|
|
5835
5835
|
const mutationString = request.mutation || query;
|
|
5836
|
-
const result = await this.$__client.mutation(mutationString, variables || {}).toPromise();
|
|
5836
|
+
const result = await this.$__client.mutation(mutationString, variables || {}, context).toPromise();
|
|
5837
5837
|
return this.formatResponse(result);
|
|
5838
5838
|
}
|
|
5839
5839
|
// Alias for mutation() to match JS SDK interface
|
|
@@ -8263,6 +8263,7 @@ var QueryActiveSession = class extends Query {
|
|
|
8263
8263
|
metaId
|
|
8264
8264
|
jsonData
|
|
8265
8265
|
createdAt
|
|
8266
|
+
updatedAt
|
|
8266
8267
|
}
|
|
8267
8268
|
}
|
|
8268
8269
|
`;
|
|
@@ -10383,7 +10384,7 @@ var KnishIOClient = class {
|
|
|
10383
10384
|
/**
|
|
10384
10385
|
* Executes a query or mutation
|
|
10385
10386
|
*/
|
|
10386
|
-
async executeQuery(query, variables = null) {
|
|
10387
|
+
async executeQuery(query, variables = null, context = {}) {
|
|
10387
10388
|
if (this.$__authToken && this.$__authToken.isExpired() && !this.$__authInProcess) {
|
|
10388
10389
|
this.log("info", "KnishIOClient::executeQuery() - Access token is expired. Getting new one...");
|
|
10389
10390
|
await this.requestAuthToken({
|
|
@@ -10399,7 +10400,7 @@ var KnishIOClient = class {
|
|
|
10399
10400
|
return response;
|
|
10400
10401
|
});
|
|
10401
10402
|
}
|
|
10402
|
-
return await query.execute({ variables: variables || {} });
|
|
10403
|
+
return await query.execute({ variables: variables || {}, context });
|
|
10403
10404
|
}
|
|
10404
10405
|
/**
|
|
10405
10406
|
* When a ProposeMolecule submission is rejected for a position-related
|
|
@@ -10732,7 +10733,8 @@ var KnishIOClient = class {
|
|
|
10732
10733
|
throughMolecule = false,
|
|
10733
10734
|
values = null,
|
|
10734
10735
|
keys = null,
|
|
10735
|
-
atomValues = null
|
|
10736
|
+
atomValues = null,
|
|
10737
|
+
requestPolicy = null
|
|
10736
10738
|
}) {
|
|
10737
10739
|
this.log("info", `KnishIOClient::queryMeta() - Querying metaType: ${metaType}, metaId: ${metaId}...`);
|
|
10738
10740
|
let query;
|
|
@@ -10784,7 +10786,8 @@ var KnishIOClient = class {
|
|
|
10784
10786
|
cellSlug: this.getCellSlug()
|
|
10785
10787
|
});
|
|
10786
10788
|
}
|
|
10787
|
-
|
|
10789
|
+
const context = requestPolicy ? { requestPolicy } : {};
|
|
10790
|
+
return this.executeQuery(query, variables, context);
|
|
10788
10791
|
}
|
|
10789
10792
|
/**
|
|
10790
10793
|
* Queries meta assets and verifies cryptographic integrity of associated molecules.
|