npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

@efstajas/gql-iterate

v0.1.2

Published

πŸ”πŸ“ƒπŸͺ A CL tool for running the same GQL query repeatedly with variable values from a CSV.

Readme

πŸ“ƒ GQL-Iterate

A simple CL utility for running a query repeatedly with different variable values supplied from a CSV. Ever had to mass-query some object off GQL, but the server only supports fetching what you need one-by-one? That's what this is for!

‡ Install

gql-iterate is available from the NPM and GitHub Packages repositories.

npm install @efstajas/gql-iterate -g

or

yarn add @efstajas/gql-iterate -g

πŸ€“ Usage

Create a .gql file containing your query, which can be named anything (make sure there's only a single query specified in the file). Define the variables that you want gql-iterate to read from a CSV with the usual syntax. For example:

query GetUser($userId: String) {
  user(userId: $userId) {
    firstName
    lastName
    favoriteColor
  }
}

Next, create your input CSV file. Your file MUST be a valid CSV (with comma delimiter!) and a header that matches the variable names (without $ prefix) from your query. For example:

userId
1234
1235
1236
1237

If you have more than one variable in your query, you must supply those additional variables in the CSV as well.

Now, it's time to run the queries! From the directory that contains your query and input CSV, run:

gql-iterate --host https://yourserver.com/graphql --input ./input.csv --query ./query.gql

GQL-Iterate will now run all of your queries (this might take a while depending on the length of your CSV and speed of your server) and print the output to console, as one stringified JSON object per line.

πŸ— Authentication

GQL-iterate currently only supports Authorization: Bearer Header-based auth. To supply a bearer token, simply run the CLI with the --bearer < your token > option.