Giter Club home page Giter Club logo

graphql-pokemon's People

Contributors

allcontributors[bot] avatar dependabot-preview[bot] avatar dependabot[bot] avatar depfu[bot] avatar favna avatar favware-bot avatar github-actions[bot] avatar imgbotapp avatar kunoichiz avatar mudkipscience avatar nandhagk avatar pelletier197 avatar renovate-bot avatar renovate[bot] avatar rexogamer avatar sawa-ko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

graphql-pokemon's Issues

Fix(DexService->Sprites):

Please describe the problem you are having in as much detail as possible:

Sprites are missing the .gif extension thus resulting in invalid URLs

Include a reproducible code sample here, if possible:

fragment dexdetails on DexDetails {
  num species types
  abilities { first second hidden special }
  baseStats { hp attack defense specialattack specialdefense speed }
  gender { male female special }
  color eggGroups evolutionLevel evos prevo forme formeLetter
  height weight baseForme baseSpecies otherFormes
  sprite shinySprite smogonTier
  bulbapediaPage serebiiPage smogonPage
  flavorTexts { game flavor }
}

fragment evolutions on DexDetails {
  evolutions { ...dexdetails }
  preevolutions { ...dexdetails }
}

{
  getPokemonDetails(pokemon:melmetal) {
    ...dexdetails
    ...evolutions
  }
}

Further details:

  • version: 1.0.1
  • Node.js version: 12-LTS
  • Operating system: Windows
  • Priority this issue should have – please be realistic and elaborate if possible: Critical
  • I have also tested the issue on latest master, commit hash: 97bb3ed

request: Proposition for static documentation

Is your feature request related to a problem? Please describe.

This is less a feature request than a proposition. I have implemented a documentation generator for GraphQL called Magidoc, and I am trying to bring this into open source projects in order to get some feedback and get the user-base to grow. I came across your project in my research.

Describe the solution you'd like

Basically, I noticed you didn't have Github pages set up yet, so I propose to implement an auto-generated GraphQL documentation for this project that would be hosted directly into the Github Pages. This could contain an auto-generated API Reference and whatever else you like in fact.

I don't mind doing the whole thing and opening a PR, or letting you try it out and give me feedback about what you liked and disliked.

In the end, it's just a proposition, so no pressure at all if you're not interested. Thank you!

Feat(core): custom scalar types to allow subfield selections

Is your feature request related to a problem? Please describe.

With v1.0.0 all fields are always returned because they are returned as a GraphQLJSONObject. By writing custom Scalar Object Types subfield selections can be made.

Describe the ideal solution

Custom Scalar types should be written

Additional context

The SpaceX API also has this kind of system

request: paginate the response of `getAllPokemon` to allow for further nesting of data

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Currently the response of getAllPokemon is, by default, not paginated. This sets a hard limit on how much data can be returned defined by the string limit that the v8 engine can handle (~1GB). At the time of writing (2023-15-12) with the data from Scarlet & Violet Indigo Disk the full JSON is ~524 MB. This size will ever only increase as time goes on and more Pokémon are released. Furthermore, this limit also blocks the expansion of further nesting data, such as changing otherFormes to be proper Pokemon references as opposed to just species strings.

Important

This change would be a breaking change because the response of getAllPokemon would drastically change.

Desired solution

To resolve this issue the response from getAllPokemon should be paginated by default. The following rules will be applied:

  • If no pagination options are provided by the user the default amount per page of 250 is used
  • Input validation will ensure the user can never request more than 250 Pokémon per page
  • The following interface will be used for a paged response:
interface PaginatedResponse {
  data: TheOldDataObject;
  totalCount: number; // The total count of results
  pages: number; // The total amount of pages based on taken and totalCount
  page: number; // The current page number
  offsetForCurrentPage: number; // The offset provided for this request
  offsetNextPage: number; // The offset to provide to jump to the next page
  taken: number; // The amount taken (length of data)
}

Alternatives considered

  • Migrating to a different programming language than TypeScript that doesn't have the 1GB limit that v8 does. This however is only delaying the inevitable because at some point any programming language is going to run out of space.

Additional context

#899 where otherFormes nesting was added as an attempt to provide more data to the end-user

request: high res images

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

High resolution images of pokemon would be a neat addition

Desired solution

redirection links to serebii images

Alternatives considered

none

Additional context

No response

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update all non-major dependencies (@vitest/coverage-v8, docker/build-push-action, vitest)

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • node 20-alpine
github-actions
.github/workflows/auto-updater.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/upload-artifact v4
  • actions/upload-artifact v4
.github/workflows/branch-imager.yml
  • actions/checkout v4
  • docker/setup-buildx-action v3.4.0
  • docker/login-action v3.2.0
  • docker/login-action v3.2.0
  • docker/build-push-action v6.3.0
.github/workflows/continuous-deployment.yml
  • actions/checkout v4
  • docker/setup-buildx-action v3.4.0
  • docker/login-action v3.2.0
  • docker/login-action v3.2.0
  • docker/build-push-action v6.3.0
  • peter-evans/dockerhub-description v4
  • actions/checkout v4
  • actions/setup-python v5
  • favware/ssh-remote-action v1
  • actions/checkout v4
  • actions/setup-node v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/setup-node v4
  • actions/upload-artifact v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • actions/download-artifact v4
  • actions/download-artifact v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
  • actions/download-artifact v4
  • actions/download-artifact v4
  • actions/download-artifact v4
.github/workflows/continuous-integration.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/labelsync.yml
  • actions/checkout v4
  • crazy-max/ghaction-github-labeler v5
.github/workflows/static-documentation.yml
  • actions/checkout v4
  • actions/configure-pages v5
  • actions/setup-node v4
  • actions/upload-pages-artifact v3
  • actions/deploy-pages v4
npm
package.json
  • graphql ^16.9.0
  • @apollo/server ^4.10.4
  • @as-integrations/koa ^1.1.1
  • @commitlint/cli ^19.3.0
  • @commitlint/config-conventional ^19.2.2
  • @discordjs/collection ^2.1.0
  • @favware/cliff-jumper ^4.0.2
  • @graphql-codegen/cli ^5.0.2
  • @graphql-codegen/schema-ast ^4.1.0
  • @koa/cors ^5.0.0
  • @magidoc/cli ^6.0.0
  • @sapphire/eslint-config ^5.0.5
  • @sapphire/fetch ^3.0.2
  • @sapphire/prettier-config ^2.0.0
  • @sapphire/shapeshift ^4.0.0
  • @sapphire/timestamp ^1.0.3
  • @sapphire/ts-config ^5.0.1
  • @skyra/jaro-winkler ^1.1.1
  • @swc/core ^1.6.13
  • @types/async ^3.2.24
  • @types/cheerio ^0.22.35
  • @types/koa ^2.15.0
  • @types/koa-bodyparser ^4.3.12
  • @types/koa__cors ^5.0.0
  • @vitest/coverage-v8 ^2.0.2
  • async ^3.2.5
  • cheerio ^1.0.0-rc.12
  • colorette ^2.0.20
  • cz-conventional-changelog ^3.3.0
  • eslint ^8.57.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.1.3
  • graphql-tag ^2.12.6
  • json-stream-stringify ^3.1.4
  • koa ^2.15.3
  • koa-bodyparser ^4.4.1
  • lint-staged ^15.2.7
  • npm-run-all2 ^6.2.2
  • prettier ^3.3.3
  • replace-in-file ^8.1.0
  • rimraf ^6.0.1
  • tsup ^8.1.0
  • tsx ^4.16.2
  • vitest ^2.0.2
  • node 20.15.1
  • ansi-regex ^5.0.1
  • minimist ^1.2.8
  • yarn 4.3.1
pip_requirements
scripts/manual-tests/requirements.txt
  • requests ==2.32.3
  • autopep8 ==2.3.1
  • pylint ==3.2.5

  • Check this box to trigger a request for Renovate to run again on this repository

bug: apollo server query builder infinite field recursion

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

When adding specific properties in the query builder instead of showing the nested properties it just keeps adding itself to the path

Steps To Reproduce

  1. Navigate to the query builder
  2. Click preevolution
  3. Repeat step 2 as many times as desired

Expected behavior

It should display a list of nested properties

Screenshots

ishare-1708860203

Additional context

not sure if the issue lies with apollo and how many fields are affected, but this happens with quite a few of them

request: provide nested data for `otherFormes`

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Currently the otherFormes field for a Pokemon is an array of strings, however, this field could be a nested reference to the actual Pokémon. This is currently blocked by #900 as v8 cannot handle so much data, but once that issue is resolved this should be changed.

Desired solution

  • The otherFormes should be a [Pokemon!] type instead of a [String!] type
  • The mappers should be updated to match

Alternatives considered

N.A.

Additional context

The bulk of the changes are already done in #899.

request: cry url fields

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

showdown provides all cries as mp3 and ogg under

"https://play.pokemonshowdown.com/audio/cries/:species.mp3"
"https://play.pokemonshowdown.com/audio/cries/:species.ogg"

Desired solution

two additional fields on the Pokemon object, cryMP3URL, cryOGGURL

Alternatives considered

manually formatting the url within source code, which works, but hey still would be useful

Additional context

No response

Chore: Cleanup

Once all is done a cleanup throughout the code should be performed

Fix(Pokedex): Unique sprite field for special cases

One example is pichu spiky eared which only has a DPP sprite. Adding 2 option fields "specialSprite" and "specialSpriteShiny" will let us specify sprites for these Pokémon. The special fields are then preferred when parsing to DexDetails.

request: classification field

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

A field on the Pokemon object containing the classification (see serebii)
ishare-1708859625

Desired solution

An additional field on the object holding the string
Could prolly look around myself if there's a decent way to scrape it again like 2 years ago

Alternatives considered

none

Additional context

Would be useful for my CoreML AI PokéDex

Fix(DexService->evos/prevo): Evos and prevo fields are not being parsed correctly

Please describe the problem you are having in as much detail as possible:

It appears that the evos and prevo fields are not being parsed correctly because they are reported as null even on something like Ivysaur.

Include a reproducible code sample here, if possible:

fragment dexdetails on DexDetails {
  num species types
  abilities { first second hidden special }
  baseStats { hp attack defense specialattack specialdefense speed }
  gender { male female special }
  color eggGroups evolutionLevel evos prevo forme formeLetter
  height weight baseForme baseSpecies otherFormes
  sprite shinySprite smogonTier
  bulbapediaPage serebiiPage smogonPage
  flavorTexts { game flavor }
}

fragment evolutions on DexDetails {
  evolutions { ...dexdetails }
  preevolutions { ...dexdetails }
}

{
  getPokemonDetails(pokemon:melmetal) {
    ...dexdetails
    ...evolutions
  }
}

Further details:

  • version: 1.0.1
  • Node.js version: 12-LTS
  • Operating system: Windows
  • Priority this issue should have – please be realistic and elaborate if possible: High
  • I have also tested the issue on latest master, commit hash: 97bb3ed

request: paginate the response of `getFuzzy{Ability, Pokemon, Item, Learnset, Move}` queries to ensure data size doesn't overflow max limit

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Following issue #900 the same should be applied to the getFuzzy{Ability, Pokemon, Item, Learnset, Move} queries so they forcibly use pagination as well.

Desired solution

For details refer to #900

Alternatives considered

N.A.

Additional context

No response

request: migrate the parsing utilities from favware/dragonite to graphql-pokemon

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

The dragonite bot has some utilities for parsing the graphql-pokemon data. It would be useful if these are also exposed to users of graphql-pokemon.

Desired solution

Alternatives considered

N.A.

Additional context

No response

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

request: getAllPokemons

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

in pokemonResolver.ts, there is getAllPokemons, but when I access https://graphqlpokemon.favware.tech I can't find the query getAllPokemons

Desired solution

Can use query getAllPokemons from https://graphqlpokemon.favware.tech

Alternatives considered

I hope I can user query getAllPokemons from GrappQL endpoint, thanks

Additional context

No response

request: ipa notation for base species names

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Another niche field request birthed from working on PokéDex stuff, this page has phonetic listings for Gen 1-8, those would make for a niche but useful additional field
https://bulbapedia.bulbagarden.net/wiki/User:SnorlaxMonster/Pronunciation

Desired solution

An additional field on the Pokemon object something along the lines of pronounciation, ipa-notation etc…

Alternatives considered

Scraping the page and bundling a json document into my application

Additional context

I’ll do the above anyway and will attach the file later for ease of implementation if deemed useful enough

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.