Giter Club home page Giter Club logo

simple-contacts-api's Introduction

GraphQL API and Subscriptions demo

A very simple GraphQL API and GraphQL Client for contacts stored on a local postgres database.

Dependencies

  • JDK version 11.0.11 or above
  • Maven version 3.6.3 or above
  • PostgreSQL server version 13.4 or above

How to run

  1. Clone the repository on your machine

  2. Start the PostgreSQL server on your local machine. If you are accessing the PostgreSQL server over a network, edit the property quarkus.datasource.reactive.url in the file application.properties and replace localhost with the server IP address.

  3. Connect to your PostgreSQL server using a user like that has create DB and create user privileges, like postgres.

  4. Run the script init.sql on the PostgreSQL server. This script will create a user quarkustest with password sqlquarkustest and a database quarkustest.

  5. To run the GraphQL API, execute the run_graphql_api.sh script. It will launch the quarkus in dev mode at port 5005, and GraphQL API will be available at http://localhost:8080/graphql.

  6. To test the GraphQL endpoints, load the file SimpleContactsGraphQL.postman_collection.json in Postman and execute the API calls.

  7. To run the GraphQL Client, execute the run_graphql_client.sh script. It will launch the quarkus in dev mode at port 5006, and GraphQL API query results will be available at http://localhost:8081/dynamic.

  8. To test the subscription of GraphQL client, visit the URL http://localhost:8081/dynamic/subscription, and try adding new contacts using Postman.

simple-contacts-api's People

Contributors

zbhavyai 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.