Fork of clairvoyance to obtain GraphQL API schema through extensions objects
Find a file
2026-04-02 21:44:32 -04:00
premonition first commit 2022-01-10 18:44:32 +01:00
.gitignore first commit 2022-01-10 18:44:32 +01:00
LICENSE first commit 2022-01-10 18:44:32 +01:00
README.md README update 2026-04-02 21:44:32 -04:00
requirements.txt first commit 2022-01-10 18:44:32 +01:00

premonition

premonition is a fork of clairvoyance that leverages the extensions object in errors entries from GraphQL's responses to deduce its API schema, rather than parsing error messages. Just like clairvoyance, this allows us to get the target's schema when introspection is disabled.

If your target uses custom error messages that are not commonly seen but has verbose errors entries with keywords like selectionMismatch, argumentNotAccepted, undefinedField etc in the extensions object, then your target might use graphql-ruby and this fork might be worth a shot!

Just like clairvoyance, it outputs the schema in JSON format, compatible with GraphQL Voyager, InQL or graphql-path-enum.

Installation and usage also work the same way, see below.

Installation

$ git clone https://github.com/ovelny/premonition.git
$ cd premonition
$ pip3 install -r requirements.txt

Usage

From Python interpreter

$ python3 -m premonition --help
$ python3 -m premonition -vv -o /path/to/schema.json -w /path/to/wordlist.txt https://<your-target-path>

Many thanks to Nikita Stupin for open-sourcing clairvoyance and sharing it to everyone.