@aws-amplify/api
- Version 5.4.5
- Published
- 70.1 kB
- 3 dependencies
- Apache-2.0 license
Install
npm i @aws-amplify/api
yarn add @aws-amplify/api
pnpm add @aws-amplify/api
Overview
Api category of aws-amplify
Index
Variables
variable API
const API: APIClass;
Classes
class APIClass
class APIClass extends InternalAPIClass {}
Deprecated
Use RestApi or GraphQLAPI to reduce your application bundle size Export Cloud Logic APIs
method getModuleName
getModuleName: () => string;
method graphql
graphql: <T>( options: GraphQLOptions, additionalHeaders?: { [key: string]: string }) => T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<{ provider: AWSAppSyncRealTimeProvider; value: GraphQLResult<T>; }> : Promise<GraphQLResult<any>> | Observable<object>;
Executes a GraphQL operation
Parameter options
GraphQL Options
Parameter additionalHeaders
headers to merge in after any
graphql_headers
set in the configReturns
An Observable if queryType is 'subscription', else a promise of the graphql result from the query.
Type Aliases
type GraphQLQuery
type GraphQLQuery<T> = T & { readonly [queryType]: 'query';};
type GraphQLSubscription
type GraphQLSubscription<T> = T & { readonly [queryType]: 'subscription';};
Package Files (3)
Dependencies (3)
Dev Dependencies (1)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@aws-amplify/api
.
- Markdown[](https://www.jsdocs.io/package/@aws-amplify/api)
- HTML<a href="https://www.jsdocs.io/package/@aws-amplify/api"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1340 ms. - Missing or incorrect documentation? Open an issue for this package.