Metadata-Version: 2.1
Name: gql_query_utils
Version: 1.0.1
Summary: Python package that converts GraphQL query into dictionary.
Project-URL: Homepage, https://github.com/pgollangi/graphql-query-to-dict
Project-URL: Bug Tracker, https://github.com/pgollangi/graphql-query-to-dict/issues
Author-email: Prasanna Kumar Gollangi <pgollangi@pm.me>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# gql-query-utils
Python package with graphql queries utilities. 

## Install
Install with `pip`:
```commandline
pip install gql-query-utils
```

## Utilities

### Convert graphql query string into dictionary 
```python
from gql_query_utils.utils import query_to_dict 

query_dict = query_to_dict("""
query GetThisStuff {
    viewer {
        personal(criteria: {
            name: "PETER",
            lastName: "SCHMIDT"
        }) {
            name
            address
        }
    }
}""")

print(query_dict)
```
Output:
```json
{
  "query": {
    "viewer": {
      "personal": {
        "__args": {
          "criteria": {
            "name": "PETER",
            "lastName": "SCHMIDT"
          }
        },
        "name": true,
        "address": true
      }
    }
  }
}
```

## Usage

```python
from gql_query_utils.utils import query_to_dict 

query_to_dict(""" ${GQL_QUERY} """)
```
## License
[MIT](./LICENSE)