GithubHelp home page GithubHelp logo

Comments (11)

benhutton avatar benhutton commented on August 20, 2024 1

@imolorhe the Download CSV button comes from this plugin: https://altairgraphql.dev/docs/plugins/popular-plugins#altair-graphql-plugin-json-to-csv

It takes the json, uploads it to a third party service which returns CSV, and then stores that as a file on the file system.

The code is here: https://github.com/desiringgod/altair-graphql-plugin-json-to-csv/blob/master/index.js

from altair.

imolorhe avatar imolorhe commented on August 20, 2024

What does the download CSV button do?

from altair.

imolorhe avatar imolorhe commented on August 20, 2024

Thanks. Looks like that plugin will need an update. I'll reach out.

from altair.

imolorhe avatar imolorhe commented on August 20, 2024

This issue should be fixed. The issue in the plugin should be fixed by this PR desiringgod/altair-graphql-plugin-json-to-csv#10.

Please can you verify?

from altair.

benhutton avatar benhutton commented on August 20, 2024

@imolorhe thanks

Altair 7.2.1 fixes the rendering problem. I merged the PR for the plugin... remind me what I need to do beyond that to get the plugin to load. Specifying the version (github:[email protected]::[repo]->[desiringgod/altair-graphql-plugin-json-to-csv]) does not seem to load the plugin, and if I don't specify the version, I think I get the old broken one. What am I missing?

from altair.

imolorhe avatar imolorhe commented on August 20, 2024

The plugin should be using the latest version by now if you published the new version to npm (you can check the downloaded manifest.json file, etc)

from altair.

benhutton avatar benhutton commented on August 20, 2024

@imolorhe okay... we haven't been doing that, and I can try to figure that out.

BUT, what about running it straight off of github? Shouldn't that be working?

from altair.

imolorhe avatar imolorhe commented on August 20, 2024

Yes, but that checks for the github tag release, which the plugin doesn't currently have.

In the network tab, you can see that Altair tries to fetch the files for the version from github but fails with a 404. It leverages jsdeliver CDN API to fetch the artifacts (docs)

from altair.

benhutton avatar benhutton commented on August 20, 2024

@imolorhe okay thanks. I've got the plugin loaded and can see the queries in the network tab.

Unfortunately, things are still failing. I am wondering if the new queryResults has newlines and spaces in it and the old one does not? Put another way, do you think the output of queryResults would validate with something like https://jsonlint.com/ ?

from altair.

imolorhe avatar imolorhe commented on August 20, 2024

I took a look at it locally. All queryResults are strings now and not objects (to account for the variety of responses from the server) so you shouldn't JSON.stringify anymore

from altair.

benhutton avatar benhutton commented on August 20, 2024

okay, I've got it fixed! Thanks!

from altair.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.