Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-compose-aws

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-compose-aws

AWS Cloud API via GraphQL

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45
decreased by-22.41%
Maintainers
1
Weekly downloads
 
Created
Source

graphql-compose-aws

npm Travis Commitizen friendly semantic-release Greenkeeper badge

This module expose AWS Cloud API via GraphQL.

Live demo of AWS SDK API via GraphiQL
Live demo via GraphQL Playground (improved GraphiQL)

Generated Schema Introspection in SDL format can be found here (more than 10k types, ~2MB).

AWS SDK GraphQL

Supported all AWS SDK versions via official aws-sdk js client. Internally it generates Types and FieldConfigs from AWS SDK configs. You may put this generated types to any GraphQL Schema.

import { GraphQLSchema, GraphQLObjectType } from 'graphql';
import awsSDK from 'aws-sdk';
import { AwsApiParser } from 'graphql-compose-aws';

const awsApiParser = new AwsApiParser({
  awsSDK,
});

const schema = new GraphQLSchema({
  query: new GraphQLObjectType({
    name: 'Query',
    fields: {
      // Full API
      aws: awsApiParser.getFieldConfig(),

      // Partial API with desired services
      s3: awsApiParser.getService('s3').getFieldConfig(),
      ec2: awsApiParser.getService('ec2').getFieldConfig(),
    },
  }),
});

export default schema;

Full code examples

Installation

yarn add graphql graphql-compose aws-sdk graphql-compose-aws
// or
npm install graphql graphql-compose aws-sdk graphql-compose-aws --save

Modules graphql, graphql-compose, aws-sdk are in peerDependencies, so should be installed explicitly in your app.

Screenshots

Get List of EC2 instances from eu-west-1 region

screen shot 2017-12-03 at 18 19 28

Several AWS API calls in one query with different services and regions

screen shot 2017-12-03 at 18 07 50

License

MIT

Keywords

FAQs

Package last updated on 09 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc