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

Make it work offline #676

Closed
jedwards1211 opened this issue May 5, 2018 · 11 comments
Closed

Make it work offline #676

jedwards1211 opened this issue May 5, 2018 · 11 comments

Comments

@jedwards1211
Copy link

jedwards1211 commented May 5, 2018

Title says it all. Maybe it's easier to drop GraphiQL into an app when it fetches all of its code and styles from the internet, but remember, some devs occasionally would like to get work done without an internet connection.

@jedwards1211 jedwards1211 changed the title Make it work offline (styles are missing when offline) Make it work offline May 9, 2018
@imolorhe
Copy link
Contributor

@jedwards1211 There are several solutions for working with GraphQL offline. There's the GraphiQL mac app, there's chromeiQL, there's also altair.

@caugner
Copy link

caugner commented Jun 7, 2018

Looks like these lines are the reason it doesn't work offline out of the box:

<script src="//cdn.jsdelivr.net/es6-promise/4.0.5/es6-promise.auto.min.js"></script>
<script src="//cdn.jsdelivr.net/fetch/0.9.0/fetch.min.js"></script>
<script src="//cdn.jsdelivr.net/react/15.4.2/react.min.js"></script>
<script src="//cdn.jsdelivr.net/react/15.4.2/react-dom.min.js"></script>

@caugner
Copy link

caugner commented Jun 7, 2018

@imolorhe Getting rid of these online dependencies, would not only enable GraphiQL to work offline, but also increase privacy and security.

@AGS-
Copy link
Member

AGS- commented Sep 6, 2018

@caugner yeah, I agree. @asiandrummer, do you remember if there's some historical reason as to why we don't just bundle these?

@IvanGoncharov
Copy link
Member

@AGS- It would be great to provide bundled build 👍
But many libraries/apps wrap graphiql in their own React components or provide their own polyfills so I would argue that it should be a separate file inside NPM package something like *.bundle.min.js.

@acao
Copy link
Member

acao commented Jun 25, 2019

I was thinking for 0.14 of distributing a graphiql.bundled.min.js alongside the standard graphiql.min.js.

PS also we may be moving to rollup FWIW. then we can do tree shaking, across the monorepo :)

IvanGoncharov added a commit to IvanGoncharov/express-graphql that referenced this issue Jul 1, 2019
Better solution planned here: graphql/graphiql#676
IvanGoncharov added a commit to graphql/express-graphql that referenced this issue Jul 1, 2019
Better solution planned here: graphql/graphiql#676
@deadcoder0904
Copy link

Would love to see this bundled. Yesterday, it stopped working when my net went off.

@acao
Copy link
Member

acao commented Jun 27, 2020

see the webpack or CRA example of how to build your own custom offline bundle!

@acao acao closed this as completed Jun 27, 2020
@deadcoder0904
Copy link

@acao It's bundled in Prisma's Nexus so not sure how I can do that?

@acao
Copy link
Member

acao commented Jun 27, 2020

@deadcoder0904 then prisma needs to make it available offline! maybe open an issue in their repository?

@acao
Copy link
Member

acao commented Jun 27, 2020

our https://github.com/graphql/express-graphql/ bundles graphiql for offline usage, for example

junminstorage pushed a commit to junminstorage/express-graphql that referenced this issue Aug 14, 2020
darkhorse941019 pushed a commit to darkhorse941019/express-graphql that referenced this issue Sep 29, 2024
Better solution planned here: graphql/graphiql#676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants