phx-node 1.0.161 → 1.0.162
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HttpService } from "@nestjs/axios";
|
|
2
2
|
import { QueryOrPersistedId, SchemaGroup } from "./types";
|
|
3
3
|
export type GrpcRequestTypeV6 = QueryOrPersistedId & {
|
|
4
|
-
hostname: string;
|
|
5
4
|
variables?: Record<string, any> | null | undefined;
|
|
6
5
|
} & SchemaGroup;
|
|
7
6
|
export declare class PHXGrpcClientSystemServiceV6 {
|
|
@@ -11,6 +10,6 @@ export declare class PHXGrpcClientSystemServiceV6 {
|
|
|
11
10
|
private readonly projectSource;
|
|
12
11
|
constructor(httpService: HttpService);
|
|
13
12
|
debug(hostname: string): void;
|
|
14
|
-
query({ query, variables,
|
|
15
|
-
mutation({ query, variables,
|
|
13
|
+
query({ query, variables, persistedId, schemaGroup, }: GrpcRequestTypeV6): Promise<any>;
|
|
14
|
+
mutation({ query, variables, persistedId, schemaGroup }: GrpcRequestTypeV6): Promise<any>;
|
|
16
15
|
}
|
|
@@ -35,12 +35,10 @@ let PHXGrpcClientSystemServiceV6 = PHXGrpcClientSystemServiceV6_1 = class PHXGrp
|
|
|
35
35
|
this.logger.debug(this.internalGrpcGateway);
|
|
36
36
|
}
|
|
37
37
|
query(_a) {
|
|
38
|
-
return __awaiter(this, arguments, void 0, function* ({ query, variables,
|
|
39
|
-
if (!hostname)
|
|
40
|
-
return;
|
|
38
|
+
return __awaiter(this, arguments, void 0, function* ({ query, variables, persistedId, schemaGroup, }) {
|
|
41
39
|
try {
|
|
42
40
|
const response = yield this.httpService
|
|
43
|
-
.post(`${this.internalGrpcGateway}/query`, Object.assign(Object.assign({}, (variables && { variables })), { source: this.projectSource, query, persisted_id: persistedId, headers: {
|
|
41
|
+
.post(`${this.internalGrpcGateway}/query`, Object.assign(Object.assign({}, (variables && { variables })), { source: this.projectSource, query, persisted_id: persistedId, headers: { [constant_1.HEADER_KEY_REQUIRED_SCHOOL_ID]: true }, schemaGroup }))
|
|
44
42
|
.toPromise();
|
|
45
43
|
return response.data;
|
|
46
44
|
}
|
|
@@ -51,12 +49,10 @@ let PHXGrpcClientSystemServiceV6 = PHXGrpcClientSystemServiceV6_1 = class PHXGrp
|
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
mutation(_a) {
|
|
54
|
-
return __awaiter(this, arguments, void 0, function* ({ query, variables,
|
|
55
|
-
if (!hostname)
|
|
56
|
-
return;
|
|
52
|
+
return __awaiter(this, arguments, void 0, function* ({ query, variables, persistedId, schemaGroup }) {
|
|
57
53
|
try {
|
|
58
54
|
const response = yield this.httpService
|
|
59
|
-
.post(`${this.internalGrpcGateway}/mutation`, Object.assign(Object.assign({}, (variables && { variables })), { source: this.projectSource, query, persisted_id: persistedId, headers: {
|
|
55
|
+
.post(`${this.internalGrpcGateway}/mutation`, Object.assign(Object.assign({}, (variables && { variables })), { source: this.projectSource, query, persisted_id: persistedId, headers: { [constant_1.HEADER_KEY_REQUIRED_SCHOOL_ID]: true }, schemaGroup }))
|
|
60
56
|
.toPromise();
|
|
61
57
|
return response.data;
|
|
62
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc-client-system-v6.service.js","sourceRoot":"","sources":["../../../src/module/grpc-client/grpc-client-system-v6.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yCAA4C;AAE5C,iDAAiE;
|
|
1
|
+
{"version":3,"file":"grpc-client-system-v6.service.js","sourceRoot":"","sources":["../../../src/module/grpc-client/grpc-client-system-v6.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yCAA4C;AAE5C,iDAAiE;AAO1D,IAAM,4BAA4B,oCAAlC,MAAM,4BAA4B;IAKvC,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QA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