This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@simperate/graph
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

simperate.io - simperate/graph

This is a NestJS application module which provides a GraphQL implementation for frontend applications on top of aws-sdk-v3.

IDE Preview

Features

  • Asynchronous / Reliable BULK Operations

Coverage

Access Tokens (Accounts) Management

  • Accounts - list / create / delete

S3

  • Bucket - list / create / delete
  • Object - list / delete / download / upload

EC2

  • Instance - list / start / stop / connect (SSH - xterm)

IAM

  • Permission simulator

Installation

npm install @simperate/graph

OR using YARN

yarn add @simperate/graph

Usage

Execute the server

WARNING: RUNNING THE SERVER ALLOWS CLIENTS ON THE SAME NETWORK TO USE YOUR AWS-LOCAL PROFILES AND THE UNDERLINE RESOURCES. (DEFAULT NETWORK IS 127.0.0.1 / LOCALHOST)

Simple run the package binary file:

$ simperate-graph 

[Nest] 15921   - 07/20/2021, 12:15:11 PM   [NestFactory] Starting Nest application...
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [InstanceLoader] AppModule dependencies initialized +54ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [InstanceLoader] CoreModule dependencies initialized +0ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [InstanceLoader] CredentialsModule dependencies initialized +1ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [InstanceLoader] StorageModule dependencies initialized +2ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +0ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [InstanceLoader] GraphQLModule dependencies initialized +1ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [RoutesResolver] StorageController {/storage}: +10ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [RouterExplorer] Mapped {/storage/upload/object, POST} route +1ms
[Nest] 15921   - 07/20/2021, 12:15:11 PM   [NestApplication] Nest application successfully started +225ms

Server is running.

server is running now by default under the URL:

http://localhost:3000/graphql

ENVIRONMENT VARIABLES

AWS_GRAPH_HOST

default: 127.0.0.1

AWS_GRAPH_PORT

default: 3000

NODE_ENV

default: production

values: development | production

determines the following (development):

  • debug
  • playground / apollo graphql IDE exposure
  • auto-schema

all above are disable under production node-environment.

Usage

The server uses the standard credential profiles of aws-sdk-v3, to a profile it is necessary to manually append the .aws/credentials file.

All resource specific queries and mutations need profile AND region selection via HEADERS:

x-aws-account = <profile-name>
x-aws-region = <region: (us-east-1 | eu-central-1) etc.> 

To request the all host profiles run the following query

query accounts {
  accounts {
    name
    accessKeyId
    info {
      arn
    }
    lastUsed {
      date
      serviceName
      region
    }
  }
}

Note: This query does not require profile OR region selection

Note: for security reasons the server does not expose SECRETS such as aws-secret-key etc.

Readme

Keywords

none

Package Sidebar

Install

npm i @simperate/graph

Weekly Downloads

0

Version

1.6.0

License

ELv2

Unpacked Size

203 kB

Total Files

19

Last publish

Collaborators

  • alex20465