Skip to main content

GraphQL query builder.

Project description

docs/assets/showcase.gif

Installation

pip3 install gqt

Usage

Interactively create a query and execute it:

$ gqt https://mys-lang.org/graphql
{
    "statistics": {
        "start_date_time": "2022-05-29 20:54:48",
        "number_of_graphql_requests": 234
    }
}

Repeat last query:

$ gqt -r https://mys-lang.org/graphql
{
    "statistics": {
        "start_date_time": "2022-05-29 20:54:48",
        "number_of_graphql_requests": 234
    }
}

Print the query instead of executing it:

$ gqt -q https://mys-lang.org/graphql
{"query":"{statistics {start_date_time number_of_graphql_requests}}"}

Use jq for colors (not seen below) and extracting field values:

$ gqt https://mys-lang.org/graphql | jq
{
  "statistics": {
    "start_date_time": "2022-05-29 20:54:48",
    "number_of_graphql_requests": 235
  }
}
$ gqt https://mys-lang.org/graphql | jq .statistics.number_of_graphql_requests
236

Ideas

  • Print built query instead of executing it.

  • Contols:

    • Use / to fuzzy find field.

  • Variables?

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gqt-0.17.0.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

gqt-0.17.0-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page