Skip to content

andru1236/mock-gateway

Repository files navigation

mock-gateway

GQL, API REST

Requierements:

  • Nvm
  • Node 14
  • Yarn
  • Mongodb
  • Docker
  • Docker-compose

Run with docker

Make build
Make start

Without docker:

yarn
yarn start
# Run Docker in port 27017
GraphQL queries to test
-----------------------
query getApis {
  apis {
    _id
    name
    port
    routes {
      _id
      path
    }
  }
}
query getApi($id: String!) {
  api(_id: $id) {
    _id
    name
    port
    settings {
      enabled
      created_on
    }
    routes {
      _id
      path
      resources
    }
  }
}

query getResponses {
  responses {
    _id
    name
    created_on
    tracking_assignation {
      api{
        id
        name
        port
        routes{
          ...
        }
      }
    }
  }
}
query getResponse($id: String!) {
  response(_id: $id) {
    _id
    name
    response
    created_on
    tracking_assignation {
      api{
        id
        name
        port
        routes{
          ...
        }
      }
      routes {
        path
        method
        date
      }
    }
  }
}