@aws-amplify/api-graphql 2.3.21-unstable.3 → 2.3.22-unstable.10
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/CHANGELOG.md +8 -0
- package/package.json +7 -7
- package/lib/GraphQLAPI.d.ts +0 -81
- package/lib/index.d.ts +0 -5
- package/lib/types/index.d.ts +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.3.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api-graphql@2.3.20...@aws-amplify/api-graphql@2.3.21) (2022-10-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-amplify/api-graphql
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [2.3.20](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api-graphql@2.3.19...@aws-amplify/api-graphql@2.3.20) (2022-10-14)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @aws-amplify/api-graphql
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api-graphql",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.22-unstable.10+7a2f3ecf0",
|
|
4
4
|
"description": "Api-graphql category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@types/zen-observable": "^0.8.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@aws-amplify/api-rest": "2.0.
|
|
48
|
-
"@aws-amplify/auth": "4.6.
|
|
49
|
-
"@aws-amplify/cache": "4.0.
|
|
50
|
-
"@aws-amplify/core": "4.7.
|
|
51
|
-
"@aws-amplify/pubsub": "4.5.
|
|
47
|
+
"@aws-amplify/api-rest": "2.0.58-unstable.10+7a2f3ecf0",
|
|
48
|
+
"@aws-amplify/auth": "4.6.11-unstable.10+7a2f3ecf0",
|
|
49
|
+
"@aws-amplify/cache": "4.0.60-unstable.10+7a2f3ecf0",
|
|
50
|
+
"@aws-amplify/core": "4.7.9-unstable.10+7a2f3ecf0",
|
|
51
|
+
"@aws-amplify/pubsub": "4.5.8-unstable.10+7a2f3ecf0",
|
|
52
52
|
"graphql": "15.8.0",
|
|
53
53
|
"uuid": "^3.2.1",
|
|
54
54
|
"zen-observable-ts": "0.8.19"
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"lib-esm"
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "7a2f3ecf0fda83f087b1c2ce650f4b5f00214dbe"
|
|
101
101
|
}
|
package/lib/GraphQLAPI.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { OperationTypeNode } from 'graphql';
|
|
2
|
-
import Observable from 'zen-observable-ts';
|
|
3
|
-
import { GraphQLOptions, GraphQLResult, GraphQLOperation } from './types';
|
|
4
|
-
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string, userAgentSuffix?: string) => {
|
|
5
|
-
query: any;
|
|
6
|
-
variables: {};
|
|
7
|
-
authToken: string;
|
|
8
|
-
userAgentSuffix: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Export Cloud Logic APIs
|
|
12
|
-
*/
|
|
13
|
-
export declare class GraphQLAPIClass {
|
|
14
|
-
/**
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
private _options;
|
|
18
|
-
private _api;
|
|
19
|
-
Auth: import("@aws-amplify/auth/lib-esm/Auth").AuthClass;
|
|
20
|
-
Cache: import("@aws-amplify/cache/lib-esm/types").ICache;
|
|
21
|
-
Credentials: import("@aws-amplify/core").CredentialsClass;
|
|
22
|
-
/**
|
|
23
|
-
* Initialize GraphQL API with AWS configuration
|
|
24
|
-
* @param {Object} options - Configuration object for API
|
|
25
|
-
*/
|
|
26
|
-
constructor(options: any);
|
|
27
|
-
getModuleName(): string;
|
|
28
|
-
/**
|
|
29
|
-
* Configure API
|
|
30
|
-
* @param {Object} config - Configuration of the API
|
|
31
|
-
* @return {Object} - The current configuration
|
|
32
|
-
*/
|
|
33
|
-
configure(options: any): any;
|
|
34
|
-
/**
|
|
35
|
-
* Create an instance of API for the library
|
|
36
|
-
* @return - A promise of true if Success
|
|
37
|
-
*/
|
|
38
|
-
createInstance(): true | Promise<never>;
|
|
39
|
-
private _headerBasedAuth;
|
|
40
|
-
/**
|
|
41
|
-
* to get the operation type
|
|
42
|
-
* @param operation
|
|
43
|
-
*/
|
|
44
|
-
getGraphqlOperationType(operation: GraphQLOperation): OperationTypeNode;
|
|
45
|
-
/**
|
|
46
|
-
* Executes a GraphQL operation
|
|
47
|
-
*
|
|
48
|
-
* @param options - GraphQL Options
|
|
49
|
-
* @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config
|
|
50
|
-
* @returns An Observable if the query is a subscription query, else a promise of the graphql result.
|
|
51
|
-
*/
|
|
52
|
-
graphql<T = any>({ query: paramQuery, variables, authMode, authToken, userAgentSuffix, }: GraphQLOptions, additionalHeaders?: {
|
|
53
|
-
[key: string]: string;
|
|
54
|
-
}): Observable<GraphQLResult<T>> | Promise<GraphQLResult<T>>;
|
|
55
|
-
private _graphql;
|
|
56
|
-
createInstanceIfNotCreated(): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Checks to see if an error thrown is from an api request cancellation
|
|
59
|
-
* @param {any} error - Any error
|
|
60
|
-
* @return {boolean} - A boolean indicating if the error was from an api request cancellation
|
|
61
|
-
*/
|
|
62
|
-
isCancel(error: any): any;
|
|
63
|
-
/**
|
|
64
|
-
* Cancels an inflight request. Only applicable for graphql queries and mutations
|
|
65
|
-
* @param {any} request - request to cancel
|
|
66
|
-
* @return {boolean} - A boolean indicating if the request was cancelled
|
|
67
|
-
*/
|
|
68
|
-
cancel(request: Promise<any>, message?: string): any;
|
|
69
|
-
/**
|
|
70
|
-
* Check if the request has a corresponding cancel token in the WeakMap.
|
|
71
|
-
* @params request - The request promise
|
|
72
|
-
* @return if the request has a corresponding cancel token.
|
|
73
|
-
*/
|
|
74
|
-
hasCancelToken(request: Promise<any>): any;
|
|
75
|
-
private _graphqlSubscribe;
|
|
76
|
-
/**
|
|
77
|
-
* @private
|
|
78
|
-
*/
|
|
79
|
-
_ensureCredentials(): any;
|
|
80
|
-
}
|
|
81
|
-
export declare const GraphQLAPI: GraphQLAPIClass;
|
package/lib/index.d.ts
DELETED
package/lib/types/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Source, DocumentNode, GraphQLError } from 'graphql';
|
|
2
|
-
export { OperationTypeNode } from 'graphql';
|
|
3
|
-
import { GRAPHQL_AUTH_MODE } from '@aws-amplify/auth';
|
|
4
|
-
export { GRAPHQL_AUTH_MODE };
|
|
5
|
-
export interface GraphQLOptions {
|
|
6
|
-
query: string | DocumentNode;
|
|
7
|
-
variables?: object;
|
|
8
|
-
authMode?: keyof typeof GRAPHQL_AUTH_MODE;
|
|
9
|
-
authToken?: string;
|
|
10
|
-
userAgentSuffix?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface GraphQLResult<T = object> {
|
|
13
|
-
data?: T;
|
|
14
|
-
errors?: GraphQLError[];
|
|
15
|
-
extensions?: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare enum GraphQLAuthError {
|
|
20
|
-
NO_API_KEY = "No api-key configured",
|
|
21
|
-
NO_CURRENT_USER = "No current user",
|
|
22
|
-
NO_CREDENTIALS = "No credentials",
|
|
23
|
-
NO_FEDERATED_JWT = "No federated jwt",
|
|
24
|
-
NO_AUTH_TOKEN = "No auth token specified"
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* GraphQLSource or string, the type of the parameter for calling graphql.parse
|
|
28
|
-
* @see: https://graphql.org/graphql-js/language/#parse
|
|
29
|
-
*/
|
|
30
|
-
export declare type GraphQLOperation = Source | string;
|