An express proxy server to access Yelp graphql api
- Graphql queries are in
src/query.js
file - Routes are in
src/routes.js
file - Graphql client config file
src/graphql-client.js
Headers included in graphql client config to satisfy Yelp api requirments.
const 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.