[reference] renderGraphiql Package
Fixes #1117. This will help the CDN users to easily implement graphiql IDE without using any build tools like Webpack. They can perform all the actions they will intend to do without build tools.
@acao I moved the functions in a separate module. can you take a look at it, please!!!!
@iFlameing looking better, now lets expose the options for generating the fetcher in my example i linked to. lets port over that logic and the typescript definitions
@iFlameing like this: https://github.com/graphql/graphiql/blob/94d64b19f5fd4534a7ee0aa0d1f56b980a94401b/packages/graphiql/src/renderGraphiQL.js#L12
@acao I provided the options for generating the fetcher and also added typescript. Please! take a look!!
@iFlameing looking excellent! I’ll take a closer look tonight. Do you want to create a render-graphiql-example as well? also lets make sure directory names are lower case, for better linux support
@acao Yes! I want to create an example. Can you give me some starter points regarding how I can use it in an example?
@acao I have created a simple example in javascript https://github.com/iFlameing/graphiqlCDN. I don't know how I can build this package so that I can use it in the HTML file.
It is totally the same as this package only it doesn't contains typescript parts.
@iFlameing my bad, i meant like in the /examples repository, so the example would be in this PR.
please just re-create from the webpack example, and use the encapsulation function instead
thanks for all your help on this, its looking great!
@iFlameing hey so, lets get this one revived! I think it's close, can you remove the package-lock.json? I'll see if i can fix the typescript issue you were having
@iFlameing can you give me permission to commit to this PR?
@acao I am happy to do any help :) You can commit to this PR. If you need any help please ping me here or in discord :)
@acao wait a sec I will do a commit for removing package-lock.json :)
It looks like there are still some package-lock.json files if you can clean those up!
@acao I have removed the package-lock.json :)
Nice! i've been working on it for a few hours, and I almost have the typescript working, and the type interfaces defined. there was a lot missing, because there was no tsconfig.json, the typescript was not working for the package at all - in vscode, etc. many of the functions didn't work at all, so I might add some basic unit tests as well?
so, theres just still a lot of work that needs to be done to get this ready, still working through linting issues (this is why the CI build is failing), and i've stashed my work and will come back!
what is missing from this one? I'd like to use the latest GraphiQL in my Koa app
@sibelius a lot of things, i spent a lot of time just trying to get it to pass the linter or compile.
most importantly, it has a major security vulnerability that we just fixed in playground
we just need to re-do this entire PR
@acao can you push your changes so that I can take a look and learn the things which I am missing in this PR
@iFlameing first you will need to fix the original linting failures. you can see the list of fixes you need to make when you use a linter.
there are many more considerations but we will be going in a different direction
@sibelius if you're interested in helping to get this where it needs to be, let's start with opening a PR to fix the linting failures. @iFlameing you are also welcome to fix the linting errors here so we can move forward on this PR
then, let's evaluate the best method to do this. the playground middlewares suggest one route, but we have other options. express-graphql has a nice approach as well. let's make sure whatever route we choose works offline instead of relying on CDN urls, as well