Skip to content

Funfunz/s3-data-connector

Repository files navigation

Funfunz S3 Data Connector

Discord Build Status codecov node npm version PRs Welcome GitHub

This connector creates all the mutations and query to upload and retrieve files from an S3 bucket

At the moment, the connector is using the local machine AWS credentials

Documentation

Just follow the link

Usage

S3 config

{
  connectors: {
    [key: string]: { // user defined name for the connector
      type: '@funfunz/s3-data-connector',
      config: {
        bucket: string // name of the bucket
        region?: string // region of the bucket
        apiVersion?: string // api version to use
      },
    }
    ...
  }
}

S3 entity

import { model } from '@funfunz/s3-data-connector'

export default model({
      name: 's3', // name for the entity, this will be visible under the GraphQL docs
      connector: 's3' // name defined by the user on the config file
    })