Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CICD License: GPL v3

RevQL

GraphQL object reverse lookup tool. The goal of this tool is to:

  • Search for all queries/mutations to specific objects
  • Search for all queries/mutations to any object containing a specific field

Installing

cargo install revql --git https://github.com/e4ac/revql/

Usage

Usage: revql [OPTIONS] <FILE> <SEARCH>

Arguments:
  <FILE>    Specifies the path to the JSON file containing the introspection result
  <SEARCH>  Specifies the search term

Options:
  -o, --output-file <OUTPUT_FILE>  Specifies the output file path. Print to console if not specified
      --no-color                   Specifies whether to disable color output
      --search-mode <SEARCH_MODE>  Specifies the search mode [default: type] [possible values: type, description, field]
      --contains                   Specifies whether to perform a "contains" match instead of an exact match
      --ignore-case                Specifies whether to ignore cases when searching
  -u, --url                        Specifies that <FILE> is a URL instead of a schema file
  -H, --header <HEADERS>           Specifies the header to include in the request
      --query-file <QUERY_FILE>    Specifies the path to a custom `.graphql` file for the introspection query
      --query <QUERY>              Specifies a custom introspection query
  -X, --request <METHOD>           Specifies the HTTP method to use [default: POST] [possible values: GET, POST]
  -h, --help                       Print help

Examples

Search for all queries/mutations to a type named User:

revql schema.json User

Search for all queries/mutations to any type with User in it:

revql --contains schema.json User

Search for all queries/mutations to any type with a field named username:

revql schema.json username --search-mode field

Search for all queries/mutations to any type/field with a description some desc:

revql schema.json 'some desc' --search-mode description --contains

Search for all queries/mutations to a type named User using a URL:

revql --url https://graphqlzero.almansi.me/api User

Search for all queries/mutations to a type named User using a URL with GET:

revql --url https://graphqlzero.almansi.me/api User -X GET -H 'Content-Type: application/json' -H 'apollo-require-preflight: true'

About

GraphQL object reverse lookup tool

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages