• Version 5.4.5
  • Published
  • 70.1 kB
  • 3 dependencies
  • Apache-2.0 license


npm i @aws-amplify/api
yarn add @aws-amplify/api
pnpm add @aws-amplify/api


Api category of aws-amplify



variable API

const API: APIClass;


    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 config


        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.


          To add a badge like this onejsDocs.io badgeto 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
          • 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>