Skip to content

Conversation

ev-dev
Copy link

@ev-dev ev-dev commented Dec 14, 2018

Initial response to #910 with basic implementation of a possible official graphql-playground Docker image.

Changes proposed in this pull request:

  • Minimal static server with template from html package (sources latest playground release)
  • Dockerfile for building the node app
  • Ability to configure container via environment variables (port/endpoint/etc.)

@CLAassistant
Copy link

CLAassistant commented Dec 14, 2018

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


ev-dev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

…e from html plugin instead containing static url for latest middleware
@huv1k
Copy link
Collaborator

huv1k commented Dec 18, 2018

@ev-dev Thanks for the PR, it looks nice. But I think the best idea is to server graphql-playground-html, because when something is going to change in that package we need to add it to docker/server/index.js what is kind of contra productive.

RUN yarn

ENV GRAPHQLPLAYGROUND_PORT 8080
ENV GRAPHQLPLAYGROUND_HOST "http://localhost:3000/graphql"
Copy link

Choose a reason for hiding this comment

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

I think this should be GRAPHQLPLAYGROUND_API_ENDPOINT or GRAPHQLPLAYGROUND_ENDPOINT

<title>${title}</title>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/css/index.css" />
<link rel="shortcut icon" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/favicon.png" />
<script src="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js"></script>
Copy link

Choose a reason for hiding this comment

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

shouldn't those come from the image ? (if I'm running graphql-playground in docker I expect it to work even without internet connection)

`GraphQL Host set to ${host} ${
host === defaults.host ? '(Default)' : ''
}`,
`\n\nServing the GraphQL Playground on http://localhost:${port}/playground ${
Copy link

Choose a reason for hiding this comment

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

does it only listen on 127.0.0.1 ? if not be default there should be an option to make it listen on 0.0.0.0 or something else (so that it works with a reverse proxy)

@Ambro17
Copy link

Ambro17 commented Mar 23, 2020

This issue seems stale but it provides great functionality. If @ev-dev agrees i can try to implement the two requested changes to help this getting merged.

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.

5 participants