Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Allow fallback to hosted js files without cdn #112

Closed
ofbeaton opened this issue Aug 10, 2016 · 9 comments
Closed

Allow fallback to hosted js files without cdn #112

ofbeaton opened this issue Aug 10, 2016 · 9 comments

Comments

@ofbeaton
Copy link

Tried to use graphiql provided by this package on an intranet without an internet connection, horrible experience, everything is loaded from cdn.

Similar issues in other flavours of graphiql, seems like I'm not the only one having this issue.
expo/koa-graphiql#1

This was already fixed in the example/ for graphiql itself: graphql/graphiql#135

Could we please have a fallback where if the cdn fails to load the files it loads a local copy?

@leebyron
Copy link
Contributor

Good idea. Should be able to pass something like "local" or "cdn" to the graphiql option

This would be a good pick up task for anyone interested in contributing.

@ofbeaton
Copy link
Author

or perhaps something like bellow? Though the advantage of the local flag is that it wouldn't even bother trying to hit the external network.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery.min.js') }}"><\/script>')</script>

@ilia-luk
Copy link

+1

@KyleAMathews
Copy link

Or just make GraphiQL a react app and compile it out to a bundle.js.

@dgrcode
Copy link

dgrcode commented Jan 21, 2018

I'm happy to work on this if nobody is already doing it

@tanaypratap
Copy link

@dgrcode are you working on this?
I like @KyleAMathews idea of making the app react app. I can pick it up and give it a try.

@dgrcode
Copy link

dgrcode commented Apr 9, 2019

@tanaypratap I didn't start working on it. Feel free to take it 👍

@tanaypratap
Copy link

great. I will be working on this and putting up a draft peer soon. Thanks for the quick reply @dgrcode

@IvanGoncharov
Copy link
Member

CDN usage was completely removed in #524

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants