GithubHelp home page GithubHelp logo

isabella232 / kong-apollo-quickstart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kong/kong-apollo-quickstart

0.0 0.0 0.0 38 KB

Get up and running with Apollo GraphQL and Kong on Docker!

Dockerfile 19.73% Shell 43.54% JavaScript 36.73%

kong-apollo-quickstart's Introduction

Kong Apollo Server

In an effort to bootstrap the value of the Apollo GraphQL Server and the Kong API Gateway - we've developed the kong-apollo-quickstart project. It leverages the querying power of GraphQL and the protection of a gateway, in a Docker container pre-configured to get you up and running quickly.

Kong Apollo server is a server that gives more power to your Open API specification and lets you to spin up your own Apollo GraphQL server using a Swagger file or your Graphql code.

Usage and configuration

This image can either be started by providing typeDefs and resolvers on the apollo.js file, or by providing an OpenAPI spec file through the OAS_URI environment variable.

Note that everything in apollo.js is used to start the Apollo server, be it an Apollo engine API_KEY, custom resolvers, schema, typeDefs, custom authorization, etc.

Running the Docker image

# Build Docker image from a Docker file
docker build -t kong-apollo-server:0.1 .

# Run container from the image that we build in the previous step
docker run -it -d \
   -e OAS_URI='https://swapi-with-ids.eskerda.now.sh/oas.yml'
   -p 3009:3009 \
   -t kong-apollo-server:0.1

# Now you can access a GraphQL Playground on http://localhost:3009/graphql

apollo.js can either be customized and the image rebuilt, or a new file can be mounted when starting the container as:

docker run -it -d \
   -v path/to/an/apollo.js:/kongql/apollo.js \
   -p 3009:3009 \
   -t kong-apollo-=server:0.1

Configuration Parameters

Name Type Example
OAS_URI String https://swapi-with-ids.eskerda.now.sh/oas.yml
APOLLO_PLAYGROUND_ENABLED Boolean true
APOLLO_INTROSPECTION_ENABLED Booolean true
APOLLO_SERVER_PORT Number 3009
APOLLO_API_KEY String some-api-key

kong-apollo-quickstart's People

Contributors

robserafini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.