Skip to main content

GraphQL query builder.

Project description

https://github.com/eerimoq/gqt/raw/main/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.22.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

gqt-0.22.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file gqt-0.22.0.tar.gz.

File metadata

  • Download URL: gqt-0.22.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for gqt-0.22.0.tar.gz
Algorithm Hash digest
SHA256 6d0ef14e13d9e5e9641902b5b2c9381e9a6066113a93006b5c4ea8c3548e8353
MD5 f388632a2cd00ae9ff854405ccf10485
BLAKE2b-256 73fe0fa5698b58b5ed7b733e166141feceecbb9fdeffe619ab2717fa332f90c4

See more details on using hashes here.

File details

Details for the file gqt-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: gqt-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for gqt-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b13c2729062dec050431cb52c989a074b254f5da7d36c9dde8326f8de69e4a
MD5 7078a8d4308feae987689c2ce64debb5
BLAKE2b-256 683b60f6ccae0c1a8021d0d35caf4d72fd4c848c4f07d00047c565a2b74ce41a

See more details on using hashes here.

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