Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderPlaygroundPage - cdnUrl config option #845

Merged
merged 2 commits into from
Oct 15, 2018

Conversation

penx
Copy link
Contributor

@penx penx commented Sep 24, 2018

Allow the cdn url to be passed in to renderPlaygroundPage as an option. This is to support graphql-playground being used offline by tools such as Apollo Server. See apollographql/apollo-server#1421

Allow the cdn url to be passed in to renderPlaygroundPage as an option. This is to support graphql-playground being used offline by tools such as Apollo Server. See apollographql/apollo-server#1421
@CLAassistant
Copy link

CLAassistant commented Sep 24, 2018

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@huv1k huv1k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid for me :) Thx for contribution

@penx
Copy link
Contributor Author

penx commented Sep 26, 2018

Related, I think if version is passed as an empty string then the @ sign should be removed from the CDN url, to aid serving a folder with an unspecified version from your localhost.

I'll add this patch to this PR

If version is not passed then don't append @ to the cdn url.

This is to aid serving from localhost from a folder with no given version number. See graphql#845
@penx
Copy link
Contributor Author

penx commented Sep 26, 2018

@HuVik thanks, I've made a minor change since your approval, to accompany a working example I'll put on GitHub shortly

@penx
Copy link
Contributor Author

penx commented Sep 26, 2018

working example here, though some npm link magic needed to get it to work :-)
(detailed in readme)

https://github.com/penx/graphql-server-example

@huv1k huv1k merged commit 841bd26 into graphql:master Oct 15, 2018
@huv1k
Copy link
Collaborator

huv1k commented Oct 15, 2018

Thanks for your first contribution! It will be in next release 🚀

@penx penx deleted the feature/cdn-url-config-option branch October 15, 2018 09:49
@huv1k huv1k mentioned this pull request Jan 14, 2019
cgxxv pushed a commit to cgxxv/graphql-playground that referenced this pull request Mar 25, 2022
* renderPlaygroundPage - cdnUrl config option

Allow the cdn url to be passed in to renderPlaygroundPage as an option. This is to support graphql-playground being used offline by tools such as Apollo Server. See apollographql/apollo-server#1421

* don't insert @ in cdn url if no version given

If version is not passed then don't append @ to the cdn url.

This is to aid serving from localhost from a folder with no given version number. See graphql#845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants