GraphQL wrapper API for the Golf Handicap and Information Network (GHIN). The GHIN system is used to track and calculate golfer handicaps.
This GraphQL server uses the Apollo Server with graphql-yoga.
This version supports the following Queries:
git clone https://github.com/rgstephens/graphql-ghin-wrapper.git
cd graphql-ghin-wrapper
yarn
yarn start
Before running the server, you must set the GHIN password either by setting the GHIN_KEY environment variable or setting the it in the index.js file.
Find golfer by GHIN Number
{
getGolferById(id: "331518") {
ghinNum
firstName
lastName
state
handicapIndex
trend
}
}
Find golfer by Name & State
{
getGolfers(state: "WA", lastName: "Smith", firstName: "B") {
golferCount
golfers {
ghinNum
firstName
lastName
trend
handicapIndex
email
clubName
}
}
}