Skip to content

Export of GraphQLSchema of PokéAPI v2 built with graphql-tools

License

Notifications You must be signed in to change notification settings

hoangvvo/pokemon-graphql-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pokemon-graphql-schema

This packages export GraphQLSchema built with graphql-tools, which can be used to create a GraphQL service that queries Pokémon data from PokéAPI v2.

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.

The convention is to preserve naming from their API, except - in query name will be replaced with _.

Installation

npm i pokemon-graphql-schema graphql

Usage

// 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:

const fetch = require("node-fetch");

if (!globalThis.fetch) {
    globalThis.fetch = fetch;
}

License

MIT. Do whatever your heart desires!

About

Export of GraphQLSchema of PokéAPI v2 built with graphql-tools

Topics

Resources

License

Stars

Watchers

Forks