What if we had a middleware to securely proxy graphql request from our apps to Shopify?
server side
// mounts '/auth' off of '/shopify'
app.use('/shopify', routes);
+ // mounts '/graphql'
+ app.use(proxy());
client side
fetch('/graphql', {
method: 'POST',
credentials: 'include',
body: JSON.stringify({ query: '{ shop { name } }' }),
})
.then(res => res.json())
.then(res => console.log(res.data));
Like @shopify/koa-shopify-graphql-proxy
What if we had a middleware to securely proxy graphql request from our apps to Shopify?
server side
// mounts '/auth' off of '/shopify' app.use('/shopify', routes); + // mounts '/graphql' + app.use(proxy());client side
Like @shopify/koa-shopify-graphql-proxy