Skip to content

A REST and GraphQL API generation tool for Iris (and other databases) with cloud deployment tools.

Notifications You must be signed in to change notification settings

iris-db/inception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inception

Inception is a tool that generates a REST or GraphQL api in Javascript. Inception also offers cloud depoyment tools to easily deploy an API to AWS, GCP, or Azure.

Usage

Inception generates an api from an api specification file. You can define an api spec as JSON or as a GraphQL schema.

  1. Create a file named apiSpec.gql or apiSpec.json
  2. Install the api compiler
  3. In the terminal, run sigma compile -o my_api
  4. Change into the deployment directory cd my_api/.deploy
  5. Deploy the api by executing ./linux_deploy for Linux, ./macos_deploy for macOS, and Start-Process -FilePath WinDeploy.exe for Windows.

Adding Custom Endpoints

  1. Create a file named api_ext.json
  2. Create the root object
{
  "endpoints": [],
  "variables": []
}
  1. Add an endpoint with the following format for REST apis
{
  "route": "/my/custom/route",
  "methodFunctions": {
    "get": {
      "cloudProvider": "aws",
      "credentials": {
        "accessId": "${{ variables.AWS_ACCESS_ID }}",
        "secretKey": "${{ variables.AWS_SECRET_KEY }}",
        "roleArn": "${{ variables.AWS_ROLE_ARN }}"
      },
      "functionArn": "arn:aws:lambda:us-west-2:123456789012:function:my-endpoint-handler"
    }
  }
}

About

A REST and GraphQL API generation tool for Iris (and other databases) with cloud deployment tools.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published