pokemon-graphql-schema
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

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!

Readme

Keywords

Package Sidebar

Install

npm i pokemon-graphql-schema

Weekly Downloads

3

Version

0.1.5

License

MIT

Unpacked Size

70.1 kB

Total Files

6

Last publish

Collaborators

  • hoangvvo