5.3.0 • Published 2 years ago

graphql-compose-aws v5.3.0

Weekly downloads
11
License
MIT
Repository
github
Last release
2 years ago

graphql-compose-aws

npm trends Travis Commitizen friendly semantic-release Greenkeeper badge

This module expose AWS Cloud API via GraphQL.

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

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

License

MIT

5.3.0

2 years ago

5.2.1

3 years ago

5.2.0

3 years ago

5.1.0

3 years ago

5.0.0

4 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.0

5 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago