From a6972ef65eafb5e2e635cfef2f7da58f6218c5d6 Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Wed, 27 Nov 2019 16:13:46 -0500 Subject: [PATCH 1/2] New url for swapi-graphql redirects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's will be a new build for swapi-graphql at netlify once https://github.com/graphql/swapi-graphql/pull/162 is merged, we can merge this to take it live 🌍 I'm pretty sure the order of the last two rules will be fine. If the last one doesn't work, it will still work ``` /swapi-graphql/graphql https://swapi-graphql.netlify.com/.netlify/functions/index 200 ``` this just 200 redirects (non permanent?) which essentially is netlify terms for what nginx is a proxy_path so this will just make `graphiql.org/swapi-graphql/graphql` an alias for the lambda endpoint. see the PR's develop preview before it's merged if you want to see that default lambda path in action for yourself --- site/_redirects | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site/_redirects b/site/_redirects index 35a9d89135..7bbb82f57a 100644 --- a/site/_redirects +++ b/site/_redirects @@ -1,2 +1,3 @@ -/swapi-graphql https://graphql.github.io/swapi-graphql/ 200 -/swapi-graphql/* https://graphql.github.io/swapi-graphql/:splat 200 +/swapi-graphql https://swapi-graphql.netlify.com 200 +/swapi-graphql/* https://swapi-graphql.netlify.com/:splat 200 +/swapi-graphql/graphql https://swapi-graphql.netlify.com/.netlify/functions/index 200 From 9218825dd0228724621c8ce7d2d8acf30c37c585 Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Fri, 29 Nov 2019 11:35:21 -0500 Subject: [PATCH 2/2] add slug for graphql http service so that we can support query parameters for http service requests. This will ensure we can support GET requests, and any other query parameters that might be used by express-graphql --- site/_redirects | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/_redirects b/site/_redirects index 7bbb82f57a..6dcd76bded 100644 --- a/site/_redirects +++ b/site/_redirects @@ -1,3 +1,5 @@ /swapi-graphql https://swapi-graphql.netlify.com 200 /swapi-graphql/* https://swapi-graphql.netlify.com/:splat 200 + /swapi-graphql/graphql https://swapi-graphql.netlify.com/.netlify/functions/index 200 +/swapi-graphql/graphql/* https://swapi-graphql.netlify.com/.netlify/functions/index/:splat 200