Giter Site home page Giter Site logo

pjx-graphql-apollo's Introduction

pjx-graphql-apollo

This project is one of the components of the pjx application, please check pjx-root for more details.

Project Dependencies

  • pjx-api-node - the API that this Apollo Server is consuming

For the real world problems, GraphQL is a powerful tool for a more complex infrastructure, such that a company with many differenct API endpoints, or an API have complex schema for many different scenarios, therefore many different variations to return data even on the same endpoint. There are a lot of discussions on the internet about when to use or not to use GraphQL, so, depending on your point of view, it might be overkilled to use GraphQL to connect to one and only one simple API gateway in my demo project. I am using GraphQL here only for demo purpose.

Project Tools

Environment Dependencies

Ensure you have Docker installed and running on you local machine.

Local Development (docker)

Run the following in the command line from the root of the pjx-graphql-apollo project.

docker-compose up

This will run a local graphql server in a docker container, can be reached at http://localhost:4000.

pjx graphql playground

Sample queries that you may try:

{
  cities {
    id
    name
    city
  }
 }
{
  city(id:"1"){
    id
    name
    city
  }
}

To stop the local server (container) run the following:

docker-compose down

pjx-graphql-apollo's People

Contributors

mikelau13 avatar dependabot[bot] avatar

Watchers

 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.