@aws-amplify/api 6.0.2 → 6.0.3-unstable.407b52e.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AWSAppSyncRealTimeProvider, GraphQLOperation, GraphQLOptions, GraphQLResult, OperationTypeNode, GraphQLQuery, GraphQLSubscription } from '@aws-amplify/api-graphql';
|
|
2
2
|
import { CustomUserAgentDetails } from '@aws-amplify/core/internals/utils';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { CustomHeaders } from '@aws-amplify/data-schema-types';
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated
|
|
6
7
|
* Use RestApi or GraphQLAPI to reduce your application bundle size
|
|
@@ -26,9 +27,7 @@ export declare class InternalAPIClass {
|
|
|
26
27
|
* @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config
|
|
27
28
|
* @returns An Observable if queryType is 'subscription', else a promise of the graphql result from the query.
|
|
28
29
|
*/
|
|
29
|
-
graphql<T>(options: GraphQLOptions, additionalHeaders?: {
|
|
30
|
-
[key: string]: string;
|
|
31
|
-
}, customUserAgentDetails?: CustomUserAgentDetails): T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<{
|
|
30
|
+
graphql<T>(options: GraphQLOptions, additionalHeaders?: CustomHeaders, customUserAgentDetails?: CustomUserAgentDetails): T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<{
|
|
32
31
|
provider: AWSAppSyncRealTimeProvider;
|
|
33
32
|
value: GraphQLResult<T>;
|
|
34
33
|
}> : Promise<GraphQLResult<any>> | Observable<object>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3-unstable.407b52e.0+407b52e",
|
|
4
4
|
"description": "Api category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"server"
|
|
82
82
|
],
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@aws-amplify/api-graphql": "4.0.
|
|
85
|
-
"@aws-amplify/api-rest": "4.0.
|
|
84
|
+
"@aws-amplify/api-graphql": "4.0.3-unstable.407b52e.0+407b52e",
|
|
85
|
+
"@aws-amplify/api-rest": "4.0.3-unstable.407b52e.0+407b52e",
|
|
86
86
|
"tslib": "^2.5.0"
|
|
87
87
|
},
|
|
88
88
|
"jest": {
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"__tests__"
|
|
136
136
|
]
|
|
137
137
|
},
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "407b52ef88164023d37e2fd63cbdfde26918a2e8"
|
|
139
139
|
}
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
CustomUserAgentDetails,
|
|
18
18
|
} from '@aws-amplify/core/internals/utils';
|
|
19
19
|
import { Observable } from 'rxjs';
|
|
20
|
+
import { CustomHeaders } from '@aws-amplify/data-schema-types';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* NOTE!
|
|
@@ -66,7 +67,7 @@ export class InternalAPIClass {
|
|
|
66
67
|
*/
|
|
67
68
|
graphql<T>(
|
|
68
69
|
options: GraphQLOptions,
|
|
69
|
-
additionalHeaders?:
|
|
70
|
+
additionalHeaders?: CustomHeaders,
|
|
70
71
|
customUserAgentDetails?: CustomUserAgentDetails
|
|
71
72
|
): T extends GraphQLQuery<T>
|
|
72
73
|
? Promise<GraphQLResult<T>>
|
|
@@ -78,7 +79,7 @@ export class InternalAPIClass {
|
|
|
78
79
|
: Promise<GraphQLResult<any>> | Observable<object>;
|
|
79
80
|
graphql<T = any>(
|
|
80
81
|
options: GraphQLOptions,
|
|
81
|
-
additionalHeaders?:
|
|
82
|
+
additionalHeaders?: CustomHeaders,
|
|
82
83
|
customUserAgentDetails?: CustomUserAgentDetails
|
|
83
84
|
): Promise<GraphQLResult<any>> | Observable<object> {
|
|
84
85
|
const apiUserAgentDetails: CustomUserAgentDetails = {
|