https://github.com/hoangvvo/pokemon-graphql-schema
Export of GraphQLSchema of PokéAPI v2 built with graphql-tools
https://github.com/hoangvvo/pokemon-graphql-schema
graphql graphql-tools pokeapi pokemon pokemon-graphql-schema
Last synced: 3 months ago
JSON representation
Export of GraphQLSchema of PokéAPI v2 built with graphql-tools
- Host: GitHub
- URL: https://github.com/hoangvvo/pokemon-graphql-schema
- Owner: hoangvvo
- License: mit
- Created: 2020-07-20T13:20:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T14:58:25.000Z (9 months ago)
- Last Synced: 2025-03-21T19:01:30.634Z (3 months ago)
- Topics: graphql, graphql-tools, pokeapi, pokemon, pokemon-graphql-schema
- Language: JavaScript
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pokemon-graphql-schema
This packages export `GraphQLSchema` built with [graphql-tools](https://www.graphql-tools.com/), which can be used to create a GraphQL service that queries Pokémon data from [PokéAPI v2](https://pokeapi.co/).
## Development
This library is still missing most of the API. Help us out by creating GraphQL Schema and resolvers based on [PokéAPI v2 docs](https://pokeapi.co/docs/v2).
The convention is to preserve naming from their API, except `-` in query name will be replaced with `_`.
## Installation
```bash
npm i pokemon-graphql-schema graphql
```## Usage
```js
// ES Module
import { schema } from "pokemon-graphql-schema";
// CommonJS
const { schema } = require("pokemon-graphql-schema");
```### Fetch polyfill
In `node`, you must polyfill `fetch` using [node-fetch](https://github.com/node-fetch/node-fetch):
```js
const fetch = require("node-fetch");if (!globalThis.fetch) {
globalThis.fetch = fetch;
}
```## License
[MIT](LICENSE). Do whatever your heart desires!