Skip to content

Commit fd6a7dd

Browse files
authored
chore: netlify swapi schema urls are broken (#1507)
1 parent 91df084 commit fd6a7dd

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/graphiql-webpack/src/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const App = () => (
1313
style={{ height: '100vh' }}
1414
fetcher={async graphQLParams => {
1515
const data = await fetch(
16-
'https://swapi-graphql.netlify.com/.netlify/functions/index',
16+
'https://swapi-graphql.netlify.app/.netlify/functions/index',
1717
{
1818
method: 'POST',
1919
headers: {

examples/monaco-graphql-webpack/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import JSONWorker from 'worker-loader!monaco-editor/esm/vs/language/json/json.wo
1212
// @ts-ignore
1313
import GraphQLWorker from 'worker-loader!monaco-graphql/esm/graphql.worker';
1414

15-
const SCHEMA_URL = 'https://swapi-graphql.netlify.com/.netlify/functions/index';
15+
const SCHEMA_URL = 'https://swapi-graphql.netlify.app/.netlify/functions/index';
1616

1717
// @ts-ignore
1818
window.MonacoEnvironment = {

packages/graphiql/resources/renderExample.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var parameters = {};
1313
search
1414
.substr(1)
1515
.split('&')
16-
.forEach(function(entry) {
16+
.forEach(function (entry) {
1717
var eq = entry.indexOf('=');
1818
if (eq >= 0) {
1919
parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent(
@@ -57,10 +57,10 @@ function updateURL() {
5757
var newSearch =
5858
'?' +
5959
Object.keys(parameters)
60-
.filter(function(key) {
60+
.filter(function (key) {
6161
return Boolean(parameters[key]);
6262
})
63-
.map(function(key) {
63+
.map(function (key) {
6464
return (
6565
encodeURIComponent(key) + '=' + encodeURIComponent(parameters[key])
6666
);
@@ -79,7 +79,7 @@ function graphQLFetcher(graphQLParams) {
7979
const isDev = window.location.hostname.match(/localhost$/);
8080
const api = isDev
8181
? '/graphql'
82-
: 'https://swapi-graphql.netlify.com/.netlify/functions/index';
82+
: 'https://swapi-graphql.netlify.app/.netlify/functions/index';
8383
return fetch(api, {
8484
method: 'post',
8585
headers: {
@@ -89,10 +89,10 @@ function graphQLFetcher(graphQLParams) {
8989
body: JSON.stringify(graphQLParams),
9090
credentials: 'omit',
9191
})
92-
.then(function(response) {
92+
.then(function (response) {
9393
return response.text();
9494
})
95-
.then(function(responseBody) {
95+
.then(function (responseBody) {
9696
try {
9797
return JSON.parse(responseBody);
9898
} catch (error) {

packages/monaco-graphql/src/defaults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const diagnosticDefault: Required<monaco.languages.graphql.DiagnosticsOpt
6868
allowComments: true,
6969
schemas: [],
7070
enableSchemaRequest: true,
71-
schemaUri: 'https://swapi-graphql.netlify.com/.netlify/functions/index',
71+
schemaUri: 'https://swapi-graphql.netlify.app/.netlify/functions/index',
7272
};
7373

7474
export const modeConfigurationDefault: Required<monaco.languages.graphql.ModeConfiguration> = {

0 commit comments

Comments
 (0)