This repository was archived by the owner on Oct 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
+ ## UNRELEASED
4
+
5
+ - Actual fix of compatibility with older QueryVariables API [ #140 ] ( https://github.com/hypermodeAI/functions-as/pull/140 )
6
+
3
7
## 2024-07-15 - Version 0.10.2
4
8
5
9
- No changes (re-publish of 0.10.1 to fix npm packaging issue)
6
10
7
11
## 2024-07-15 - Version 0.10.1
8
12
9
- - Fix compatibility with older QueryVariables API [ #137 ] ( https://github.com/hypermodeAI/functions-as/pull/137 )
13
+ - Attempted fix compatibility with older QueryVariables API [ #137 ] ( https://github.com/hypermodeAI/functions-as/pull/137 )
10
14
11
15
## 2024-07-15 - Version 0.10.0
12
16
Original file line number Diff line number Diff line change @@ -9,26 +9,26 @@ export abstract class connection {
9
9
/**
10
10
* @deprecated Use `graphql.execute` instead.
11
11
*/
12
- static invokeGraphqlApi < TData > (
12
+ static invokeGraphqlApi < T > (
13
13
hostName : string ,
14
14
statement : string ,
15
- variables = new graphql . Variables ( ) ,
16
- ) : graphql . Response < TData > {
17
- return graphql . execute < TData > ( hostName , statement , variables ) ;
15
+ variables : QueryVariables = new QueryVariables ( ) ,
16
+ ) : GQLResponse < T > {
17
+ const r = graphql . execute < T > ( hostName , statement , variables ) ;
18
+ return < GQLResponse < T > > {
19
+ errors : r . errors ,
20
+ data : r . data ,
21
+ } ;
18
22
}
19
23
}
20
24
21
25
/**
22
26
* @deprecated Import `graphql`, and use `graphql.Variables` instead.
23
27
*/
24
- export class QueryVariables {
25
- private qv : graphql . Variables = new graphql . Variables ( ) ;
28
+ export class QueryVariables extends graphql . Variables { }
26
29
27
- public set < T > ( name : string , value : T ) : void {
28
- this . qv . set ( name , value ) ;
29
- }
30
-
31
- public toJSON ( ) : string {
32
- return this . qv . toJSON ( ) ;
33
- }
34
- }
30
+ /**
31
+ * @deprecated Import `graphql`, and use `graphql.Response` instead.
32
+ */
33
+ @json
34
+ export class GQLResponse < T > extends graphql . Response < T > { }
You can’t perform that action at this time.
0 commit comments