Nana Plays Minesweeper

    willwill96-petfinder-graphql

    0.0.2 • Public • Published

    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

    Keywords

    Install

    npm i willwill96-petfinder-graphql

    DownloadsWeekly Downloads

    1

    Version

    0.0.2

    License

    ISC

    Unpacked Size

    23.2 kB

    Total Files

    12

    Last publish

    Collaborators

    • willwill96