GithubHelp home page GithubHelp logo

bipiane / georef-graphql Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 261 KB

API GraphQL del Servicio de Normalización de Datos Geográficos de Argentina

TypeScript 100.00%
graphql prisma docker georef argob datos argentina

georef-graphql's Introduction

API GraphQL del Servicio de Normalización de Datos Geográficos de Argentina

lifecycle

georef-graphql es un proyecto que implementa una API GraphQL de los datos importados de la API REST de georef-ar.

georef-ar: API del Servicio de Normalización de Datos Geográficos, permite normalizar y codificar los nombres de unidades territoriales de la Argentina (provincias, departamentos, municipios y localidades) y de sus calles, así como ubicar coordenadas dentro de ellas.

Tools

Setup

  $ npm install -g prisma2  
  $ npm install   
  # Environment: Copy .envrc.dist and edit .envrc
  $ cp .envrc.dist .envrc  
  # Edit prisma/schema.prisma and run Prisma2
  $ prisma2 dev  

Seed Países y Provincias

  $ npm run seed  

Import Georef AR

  $ npm run import  

Server Nexus App

  $ npm run start  

Playground App

  # Edit .graphqlconfig.yml and run
  $ graphql playground  

Query examples

query($paisTexto: String, $provinciaTexto: String) {
  paises(
    where: {
      OR: [{ 
            iso_code: { contains: $paisTexto }, 
            name: { contains: $paisTexto } 
      }]
      active: { equals: true }
    }
  ) {
    name
    provincias(where: { name: { contains: $provinciaTexto } }) {
      name
      id
    }
  }

  provincias(where: { name: { contains: $provinciaTexto } }) {
    name
  }
}

Variables

{
    "paisTexto": "AR",
    "provinciaTexto": "rio"
}

georef-graphql's People

Contributors

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