@aws-amplify/api
Advanced tools
Comparing version 6.1.9-graphql-multi-client.e61d28d.0 to 6.1.9-unstable.29b6c3f.0
@@ -13,5 +13,5 @@ 'use strict'; | ||
*/ | ||
function generateClient(options) { | ||
function generateClient(options = {}) { | ||
return (0, internals_1.generateClient)({ | ||
...(options || {}), | ||
...options, | ||
amplify: core_1.Amplify, | ||
@@ -18,0 +18,0 @@ }); |
@@ -1,3 +0,2 @@ | ||
import { V6Client } from '@aws-amplify/api-graphql'; | ||
import { CommonPublicClientOptions, DefaultCommonClientOptions } from '@aws-amplify/api-graphql/internals'; | ||
import { CommonPublicClientOptions, V6Client } from '@aws-amplify/api-graphql'; | ||
/** | ||
@@ -9,2 +8,2 @@ * Generates an API client that can work with models or raw GraphQL | ||
*/ | ||
export declare function generateClient<T extends Record<any, any> = never, Options extends CommonPublicClientOptions = DefaultCommonClientOptions>(options?: Options): V6Client<T, Options>; | ||
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions): V6Client<T>; |
{ | ||
"name": "@aws-amplify/api", | ||
"version": "6.1.9-graphql-multi-client.e61d28d.0+e61d28d", | ||
"version": "6.1.9-unstable.29b6c3f.0+29b6c3f", | ||
"description": "Api category of aws-amplify", | ||
@@ -71,3 +71,2 @@ "main": "./dist/cjs/index.js", | ||
"devDependencies": { | ||
"jest-fetch-mock": "3.0.3", | ||
"typescript": "5.0.2" | ||
@@ -84,7 +83,7 @@ }, | ||
"dependencies": { | ||
"@aws-amplify/api-graphql": "4.6.7-graphql-multi-client.e61d28d.0+e61d28d", | ||
"@aws-amplify/api-rest": "4.0.64-graphql-multi-client.e61d28d.0+e61d28d", | ||
"@aws-amplify/api-graphql": "4.6.7-unstable.29b6c3f.0+29b6c3f", | ||
"@aws-amplify/api-rest": "4.0.64-unstable.29b6c3f.0+29b6c3f", | ||
"tslib": "^2.5.0" | ||
}, | ||
"gitHead": "e61d28d6575aec0a0ff5fd5255022a0fdb301229" | ||
"gitHead": "29b6c3fd373e394d30950b9f238fcb9c6bd48a03" | ||
} |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import { V6Client } from '@aws-amplify/api-graphql'; | ||
import { | ||
CommonPublicClientOptions, | ||
DefaultCommonClientOptions, | ||
generateClient as internalGenerateClient, | ||
} from '@aws-amplify/api-graphql/internals'; | ||
import { CommonPublicClientOptions, V6Client } from '@aws-amplify/api-graphql'; | ||
import { generateClient as internalGenerateClient } from '@aws-amplify/api-graphql/internals'; | ||
import { Amplify } from '@aws-amplify/core'; | ||
@@ -17,10 +13,9 @@ | ||
*/ | ||
export function generateClient< | ||
T extends Record<any, any> = never, | ||
Options extends CommonPublicClientOptions = DefaultCommonClientOptions, | ||
>(options?: Options): V6Client<T, Options> { | ||
export function generateClient<T extends Record<any, any> = never>( | ||
options: CommonPublicClientOptions = {}, | ||
): V6Client<T> { | ||
return internalGenerateClient({ | ||
...(options || ({} as any)), | ||
...options, | ||
amplify: Amplify, | ||
}) as unknown as V6Client<T, Options>; | ||
}) as unknown as V6Client<T>; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1
54972
474