During development, I want to be able to proxy my GraphQL queries to my own GraphQL server at http://localhost:3000/graphql
I configured Gatsby like this :
module.exports = {
proxy: {
prefix: '/graphql',
url: 'http://localhost:3000'
}
}
Gatsby's development server is running at http://localhost:8000
My queries aren't proxied, they fired on http://localhost:8000/graphql and I got the empty index.html
content as a response :
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><script src="/socket.io/socket.io.js"></script></head><body><noscript id="gatsby-noscript">This app works best with JavaScript enabled.</noscript><div id="___gatsby"></div><script src="/commons.js"></script></body></html>