GraphQL introspection and path enumeration.
Project description
graphenum
Introspect a GraphQL endpoint and generate his specification schema with path enumeration.
Getting Started
It takes only two simple steps to introspect an endpoint using graphenum.
pip install graphenum
graphenum -u https://example.com/graphql -o schema.json
Options
GraphEnum supports the following options:
graphenum \
# url of the GraphQL endpoint
-u/--url https://example.com/graphql \
# input schema file (raw GraphQL schema)
-s/--schema-path schema.json \
# output file name
-o/--output-schema schema.json \
# verbose output
-v/--verbose
Environment Variables
Logger - No effect if you pass your own logger
Name | Values | Default | Behavior |
---|---|---|---|
LOG_FORMAT |
console , json |
console |
Change the log format accordingly |
DEBUG |
True , False |
False |
Enable debug logging |
Integration
import logging
from typing import Callable, Dict, Optional, List, Tuple
from graphenum import IntrospectionSchema
from graphenum.entities.internal import Callbacks
async def async_introspect( / def introspect(
url: str,
logger: Optional[logging.Logger] = None,
headers: Optional[Dict[str, str]] = None,
verbose_mode: bool = False,
schema_path: Optional[str] = None,
callbacks: Optional[Dict[Callbacks, List[Callable]]] = None,
json_encode: bool = False
) -> Tuple[IntrospectionSchema, aiohttp.ClientResponse]:
...
Local installation
git clone git@github.com:Escape-Technologies/graphenum.git
cd graphenum
chmod +x ./install-dev.sh
./install-dev.sh
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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
graphenum-0.0.3.tar.gz
(12.9 kB
view details)
Built Distribution
graphenum-0.0.3-py3-none-any.whl
(17.2 kB
view details)
File details
Details for the file graphenum-0.0.3.tar.gz
.
File metadata
- Download URL: graphenum-0.0.3.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fc32debb7bdb376257311faaa7ba38bde97e83405799bef5af3ea91b966c388 |
|
MD5 | 94ed69cd2b89de0d436d9af58cafdd12 |
|
BLAKE2b-256 | 22d806e47b155309baefd2a24b2b31b2a3e4502837286cb59260359328b5eca4 |
File details
Details for the file graphenum-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: graphenum-0.0.3-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba57a25ed70a33f715813eecb7437158852944917955435010b3507535b411b |
|
MD5 | 21ab42b90c5dd84e992c88c997da8e60 |
|
BLAKE2b-256 | d5d64a535b8dd2ca8b471b9cceafbcfa10aab9efc989b3c044890998cb949d26 |