OneGraph / graphiql-explorer

Explorer plugin for GraphiQL
MIT License
904 stars 97 forks source link

Where source code of graphiql-code-exporter package is published? #11

Closed FluorescentHallucinogen closed 5 years ago

FluorescentHallucinogen commented 5 years ago

I've found that https://www.onegraph.com/graphiql has a very useful "Code exporter" feature. After a little research, I found that this feature is implemented using a package named graphiql-code-exporter.

I've found https://www.npmjs.com/package/graphiql-code-exporter, https://www.npmjs.com/package/@sgrove/graphiql-code-exporter and https://www.npmjs.com/package/@dww/graphiql-code-exporter NPM packages. But they all points to https://github.com/OneGraph/graphiql-code-exporter repo that does not exist.

Where source code of graphiql-code-exporter package is published? Is it open-source?

sgrove commented 5 years ago

Watch this space 😂

FluorescentHallucinogen commented 5 years ago

I've also found that https://github.com/OneGraph/graphiql-explorer-example project for some reason don't use the graphiql-code-exporter package too.

FluorescentHallucinogen commented 5 years ago

@sgrove I've tried to integrate the code exporter into https://github.com/OneGraph/graphiql-explorer-example, but it seems all 3 packages (https://www.npmjs.com/package/graphiql-code-exporter, https://www.npmjs.com/package/@sgrove/graphiql-code-exporter, https://www.npmjs.com/package/@dww/graphiql-code-exporter) contain non-working (outdated?) code.

I've figured out that e.g. in line 31 of https://unpkg.com/graphiql-code-exporter@2.0.2/src/snippets/javascript/fetch.js file there must be operationDataList instead of operations. I've analyzed the minified code on the https://www.onegraph.com/graphiql page and this assumption was confirmed.

Could you please publish the actual working (which is used on https://www.onegraph.com/graphiql) package and its source code?

Full disclosure: I have a plan to integrate this package into https://graphiql-online.com and add new snippets for web components (https://apolloelements.dev).

sgrove commented 5 years ago

Published a new package!

Here's the source code: https://github.com/OneGraph/graphiql-code-exporter Example usage: https://github.com/OneGraph/graphiql-code-exporter-example (and running example: https://onegraph.github.io/graphiql-code-exporter-example)

The motivation and thought process behind it https://www.onegraph.com/blog/2019/05/03_Filling_in_the_GraphQL_Pipeline_Ready_to_use_code_generation.html

And video tour showing the ways it can be used https://www.youtube.com/watch?v=1JPf83wZWEU

FluorescentHallucinogen commented 5 years ago

@sgrove

thank-you