1.0.2 • Published 2 years ago

willwill96-petfinder-graphql v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

willwill96-petfinder-graphql

An npm package with utilities for scaffoloding a graphql server wrapping the Petfinder API

NOTE: By using the Petfinder API, you must comply with the Petfinder API Terms of Service

Example Usage

import { ApolloServer } from 'apollo-server-micro'

import {
  petFinderGraphQlSchema,
  generatePetfinderGraphQlContext,
} from 'willwill96-petfinder-graphql'

const petfinderApiKey = 'yourKey'
const petfinderSecreteKey = 'yourSecretKey'

const { typeDefs, resolvers } = petFinderGraphQlSchema
const server = new ApolloServer({
  typeDefs,
  resolvers,
  context: generatePetfinderGraphQlContext({
    petfinderApiKey,
    petfinderSecretKey,
  }),
})

For a full example, see the express implementation hosted as a docker image or Nextjs API route implementation

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago