@aws-amplify/api-graphql 3.4.31 → 3.4.32
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/lib/GraphQLAPI.d.ts +13 -0
- package/lib/GraphQLAPI.js +13 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +18 -0
- package/lib/types/index.js +5 -0
- package/lib-esm/GraphQLAPI.d.ts +13 -0
- package/lib-esm/GraphQLAPI.js +13 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/index.d.ts +18 -0
- package/lib-esm/types/index.js +5 -0
- package/package.json +7 -7
- package/src/GraphQLAPI.ts +13 -0
- package/src/types/index.ts +18 -0
package/lib/types/index.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { Source, DocumentNode, GraphQLError } from 'graphql';
|
|
|
2
2
|
export { OperationTypeNode } from 'graphql';
|
|
3
3
|
import { GRAPHQL_AUTH_MODE } from '@aws-amplify/auth';
|
|
4
4
|
export { GRAPHQL_AUTH_MODE };
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
7
|
+
* See the migration guide:
|
|
8
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
9
|
+
*/
|
|
5
10
|
export interface GraphQLOptions {
|
|
6
11
|
query: string | DocumentNode;
|
|
7
12
|
variables?: object;
|
|
@@ -12,6 +17,11 @@ export interface GraphQLOptions {
|
|
|
12
17
|
*/
|
|
13
18
|
userAgentSuffix?: string;
|
|
14
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
22
|
+
* See the migration guide:
|
|
23
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
24
|
+
*/
|
|
15
25
|
export interface GraphQLResult<T = object> {
|
|
16
26
|
data?: T;
|
|
17
27
|
errors?: GraphQLError[];
|
|
@@ -19,6 +29,11 @@ export interface GraphQLResult<T = object> {
|
|
|
19
29
|
[key: string]: any;
|
|
20
30
|
};
|
|
21
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
34
|
+
* See the migration guide:
|
|
35
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
36
|
+
*/
|
|
22
37
|
export declare enum GraphQLAuthError {
|
|
23
38
|
NO_API_KEY = "No api-key configured",
|
|
24
39
|
NO_CURRENT_USER = "No current user",
|
|
@@ -29,5 +44,8 @@ export declare enum GraphQLAuthError {
|
|
|
29
44
|
/**
|
|
30
45
|
* GraphQLSource or string, the type of the parameter for calling graphql.parse
|
|
31
46
|
* @see: https://graphql.org/graphql-js/language/#parse
|
|
47
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
48
|
+
* See the migration guide:
|
|
49
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
32
50
|
*/
|
|
33
51
|
export type GraphQLOperation = Source | string;
|
package/lib/types/index.js
CHANGED
|
@@ -3,6 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GraphQLAuthError = exports.GRAPHQL_AUTH_MODE = void 0;
|
|
4
4
|
var auth_1 = require("@aws-amplify/auth");
|
|
5
5
|
Object.defineProperty(exports, "GRAPHQL_AUTH_MODE", { enumerable: true, get: function () { return auth_1.GRAPHQL_AUTH_MODE; } });
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
8
|
+
* See the migration guide:
|
|
9
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
10
|
+
*/
|
|
6
11
|
var GraphQLAuthError;
|
|
7
12
|
(function (GraphQLAuthError) {
|
|
8
13
|
GraphQLAuthError["NO_API_KEY"] = "No api-key configured";
|
package/lib-esm/GraphQLAPI.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { GraphQLOptions, GraphQLResult } from './types';
|
|
2
2
|
import { InternalGraphQLAPIClass } from './internals';
|
|
3
3
|
import Observable from 'zen-observable-ts';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
6
|
+
* See the migration guide:
|
|
7
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
8
|
+
*/
|
|
4
9
|
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => {
|
|
5
10
|
query: any;
|
|
6
11
|
variables: {};
|
|
@@ -8,6 +13,9 @@ export declare const graphqlOperation: (query: any, variables?: {}, authToken?:
|
|
|
8
13
|
};
|
|
9
14
|
/**
|
|
10
15
|
* Export Cloud Logic APIs
|
|
16
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
17
|
+
* See the migration guide:
|
|
18
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
11
19
|
*/
|
|
12
20
|
export declare class GraphQLAPIClass extends InternalGraphQLAPIClass {
|
|
13
21
|
getModuleName(): string;
|
|
@@ -22,4 +30,9 @@ export declare class GraphQLAPIClass extends InternalGraphQLAPIClass {
|
|
|
22
30
|
[key: string]: string;
|
|
23
31
|
}): Observable<GraphQLResult<T>> | Promise<GraphQLResult<T>>;
|
|
24
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
35
|
+
* See the migration guide:
|
|
36
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
37
|
+
*/
|
|
25
38
|
export declare const GraphQLAPI: GraphQLAPIClass;
|
package/lib-esm/GraphQLAPI.js
CHANGED
|
@@ -3,6 +3,11 @@ import { __extends } from "tslib";
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { Amplify } from '@aws-amplify/core';
|
|
5
5
|
import { InternalGraphQLAPIClass } from './internals';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
8
|
+
* See the migration guide:
|
|
9
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
10
|
+
*/
|
|
6
11
|
export var graphqlOperation = function (query, variables, authToken) {
|
|
7
12
|
if (variables === void 0) { variables = {}; }
|
|
8
13
|
return ({
|
|
@@ -13,6 +18,9 @@ export var graphqlOperation = function (query, variables, authToken) {
|
|
|
13
18
|
};
|
|
14
19
|
/**
|
|
15
20
|
* Export Cloud Logic APIs
|
|
21
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
22
|
+
* See the migration guide:
|
|
23
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
16
24
|
*/
|
|
17
25
|
var GraphQLAPIClass = /** @class */ (function (_super) {
|
|
18
26
|
__extends(GraphQLAPIClass, _super);
|
|
@@ -35,5 +43,10 @@ var GraphQLAPIClass = /** @class */ (function (_super) {
|
|
|
35
43
|
return GraphQLAPIClass;
|
|
36
44
|
}(InternalGraphQLAPIClass));
|
|
37
45
|
export { GraphQLAPIClass };
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
48
|
+
* See the migration guide:
|
|
49
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
50
|
+
*/
|
|
38
51
|
export var GraphQLAPI = new GraphQLAPIClass(null);
|
|
39
52
|
Amplify.register(GraphQLAPI);
|