Skip to content

vickyqjx/simple_map

Repository files navigation

Simple Map

Overall

  • Root directory contains the code for API App
  • client directory contains the code for Frontend App

Backend API Server

Option 1 : To start API server via Docker:

Run command in the project root directory docker-compose up --build -d

Option 2 : To start API server manually :

  • Install Elixir ~> V1.8 if you do not have it installed before (https://elixir-lang.org/install.html)
  • Make sure you are in the project root directory
  • Install dependencies with mix deps.get
  • Start Phoenix endpoint with mix phx.server

Now you can test your GraphQL API via (http://localhost:4000/graphiql) API Example Query Examples:

{
  location (address: "255 Bourke St, Melbourne VIC 3000") {
    map_url
    lat
    lng
  }
}
mutation Add($name: String!, $address: String!) {
  addBookmark(name: $name, address: $address) {
    name
    address
  }
}

//GRAPHQL VARIABLES
{
  "name": "Some Building",
  "address": "115 Bourke St, Melbourne VIC 3000"
}
mutation remove_bookmark {
  remove_bookmark(
    id: 180144
  ) {
    id
  }
}

Front-end App

Steps to run:

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

enter image description here

About

Phoenix + Graphql + Typescript + ApolloJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published