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

Conversation

@CorinChappy
Copy link

@CorinChappy CorinChappy commented Feb 15, 2017

An implementation of #112, allows a user to pass "local" or "cdn" to the graphiql option in order to specify where the files should be loaded from. Is also compatible with true/false, defaulting to "cdn" if true.

I put the files in a new folder called vendor, but I am happy to change it to work a different way (using the files from npm for example), if that would be better.

I've not used flowtype before so I hope I have covered everything there! And no tests or documentation changes yet, but I can also look into adding them!

Note: I have had to change what is returned by the graphqlHTTP function, it now returns an express router instead of just a middleware function, this is so the vendor files can be served using express.static under the same route as the graphql endpoint

This option will use local copies of the graphiql file instead of the CDN versions
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@jacobbogers
Copy link

any progress on this PR?

@gilesbradshaw
Copy link

It would be really good to be able to do this

@IvanGoncharov
Copy link
Member

Closed by #524 that fully removes CDN usage.

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

5 participants