npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aws-appsync-js

v0.0.1

Published

Simple pure js client for AWS AppSync

Downloads

5

Readme

aws-appsync-js

Description

Pure js client for AWS AppSync. AWS AppSync

Welcome! AWS AppSync is a managed GraphQL service that allows web and mobile developers to create powerful data driven applications on top of AWS. Follow these steps to deploy a GraphQL API and integrate it into your application.

Design your schema

Navigate to the Schema page and design your schema using the GraphQL schema definition language (SDL). Use SDL to define the types, interfaces, and enums that define the shape of your API. Schema Reference

Add a data source

AWS AppSync runs on top of the AWS services you already know. Add an existing DynamoDB table via the Data Sources page or let us provision one for you with the Create Resources button on the Schema page. Data Source Reference

Connect data sources with a resolver

A resolver is attached to a field on an object type in your schema. The resolver executes an action against a data source whenever its field is listed in the selection set of a GraphQL query. Customize resolver behavior with mapping templates and use the full capabilities of Amazon DynamoDB, AWS Lambda, and Amazon Elasticsearch Service. Resolver Reference

Integrate your GraphQL API

Once you have deployed your API, easily add it to your application with one of our powerful SDKs or using popular tools such as Apollo Client and Relay.

Description is taken from AWS

Install

npm install aws-appsync-js
# or
yarn add aws-appsync-js

Usage

// ES6 modules
import AppSyncClient, { authMode } from 'aws-appsync-js';

// CommonJS modules
const AppSyncClient = require('aws-appsync-js').default;
const { authMode } = require('aws-appsync-js');

const appSyncClient = new AppSyncClient({
  auth: {
    mode: authMode.API_KEY_MODE,
    apiKey: 'your_app_sync_API_KEY',
    apiUrl: 'your_app_sync_API_URL',
  }
});

const query = `
  query {
    eventList {
      description
      name
    }
  }
`;

appSyncClient.request(query)
  .then(({ data: { eventList }) => {
    // do something with your data
    console.log(eventList);
  });

appSyncClient.introspect()
  .then(({ data }) => {
    // you can see your schema data
    console.log(data);
  })

Contribution

Technology is in development. It is planned to create independent client for using AWS AppSync without any strong links to any technologies. You are welcome to submit your ideas and comments using issues.