simonw / datasette-graphql

Datasette plugin providing an automatic GraphQL API for your SQLite databases
https://datasette-graphql-demo.datasette.io/
Apache License 2.0
101 stars 6 forks source link

Bundle GraphiQL #73

Closed simonw closed 3 years ago

simonw commented 3 years ago

It's currently loaded from a CDN:

https://github.com/simonw/datasette-graphql/blob/038834cba317c5a22d2441488c54d1d201d81798/datasette_graphql/templates/graphiql.html#L16-L20

Would be better to bundle it with the plugin, like with datasette-leaflet.

simonw commented 3 years ago

For the first version of this I'll grab those exact files and serve them as-is.

simonw commented 3 years ago

Need to decide where to put notes on the licenses for them. Probably bundled in the static folder.

simonw commented 3 years ago

They add up to over a MB!

7.2K fetch.min.js
 39K graphiql.css
997K graphiql.min.js
 92K react-dom.production.min.js
6.5K react.production.min.js
simonw commented 3 years ago

fetch.min.js is covered by the MIT license: https://github.com/github/fetch/blob/master/LICENSE

graphiql.css and graphiql.min.jsare MIT license: https://github.com/graphql/graphiql/blob/main/LICENSE

react-dom.production.min.js and react.production.min.js are MIT license: https://github.com/facebook/react/blob/master/LICENSE