Giter VIP home page Giter VIP logo

pokegraph-api's Introduction

PokeGraph-API

A Pokemon GraphQL API

Road map

  • Pokemon
    • Abilities (Pagination)
    • Ability Info
    • Gender
    • Pokedex (Primary Info)
  • Berries
  • Contests
  • Encounters

License

MIT ยฉ Pokegraph-API

pokegraph-api's People

Contributors

mecm1993 avatar ming-tsai avatar

Watchers

 avatar

pokegraph-api's Issues

Use nodemon on dev

๐Ÿž Problem
Currently on typescript project change, we have to stop the CLI and re-run it.

โœ… Definition of Done
Use nodemon for watch on dev script and don't have to stop the CLI

Characteristic primary info

Migration characteristic primary info to GraphQL
RestAPI response

{
  "id": 1,
  "gene_modulo": 0,
  "possible_values": [
    0,
    5,
    10,
    15,
    20,
    25,
    30
  ],
  "highest_stat": {
    "name": "hp",
    "url": "https://pokeapi.co/api/v2/stat/1/"
  },
  "descriptions": [
    {
      "description": "Loves to eat",
      "language": {
        "name": "en",
        "url": "https://pokeapi.co/api/v2/language/9/"
      }
    }
  ]
}

GraphQL Response

{
  "id": 1,
  "gene_modulo": 0,
  "possible_values": [
    0,
    5,
    10,
    15,
    20,
    25,
    30
  ],
  "highest_stat": {
    "name": "hp",
    "id": 1
  },
  "descriptions": [
    {
      "description": "Loves to eat",
      "language": {
        "name": "en",
        "id": 9
      }
    }
  ]
}

Remove Abilities and Pokedex

Remove all pagination that currently has, and add it on developing the issue #17

Definition of done

  • Remove query
    • Rename the method name using get to single entity
  • Remove schema
  • Remove methods
  • Update roadmap

Migration of pagination to GraphQL

I'm thinking about creating the pagination as a search endpoint of Github GraphQL, so we will get like this.

{
    pokedex(first:10, after:10) {
        ... on Pokemon {
            nodes {
                id
                name
            }
        }
        ... on Ability {
            nodes {
                id
                name
            }
        }
    }
}

So we won't create an endpoint for each item paginations

Egg Groups primary info

Migration of Egg Groups to GraphQL
RestAPI

{
  "id": 1,
  "name": "monster",
  "names": [
    {
      "name": "ใ‹ใ„ใ˜ใ‚…ใ†",
      "language": {
        "name": "ja",
        "url": "https://pokeapi.co/api/v2/language/1/"
      }
    }
  ],
  "pokemon_species": [
    {
      "name": "bulbasaur",
      "url": "https://pokeapi.co/api/v2/pokemon-species/1/"
    }
  ]
}

GraphQL

{
  "id": 1,
  "name": "monster",
  "names": [
    {
      "name": "ใ‹ใ„ใ˜ใ‚…ใ†",
      "language": {
        "name": "ja",
        "id": 1
      }
    }
  ],
  "pokemon_species": [
    {
      "name": "bulbasaur",
      "id": 1
    }
  ]
}

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.