yelp-graphql-api-server
api
An express proxy server to access Yelp graphqlProject contents
- Graphql queries are in
src/query.js
file - Routes are in
src/routes.js
file - Graphql client config file
src/graphql-client.js
api requirments.
Headers included in graphql client config to satisfy Yelpconst graphQLCLient = new GraphQLClient(endpoint, {
headers: {
"Access-Control-Allow-Origin": "*",
Authorization: `Bearer ${process.env.YELP_API_KEY}`,
},
})
This project uses graphql-request package to perform graphql queries/mutations. Currently there are only added queries in the project, but users can add mutations as well.