Metadata-Version: 2.1
Name: graphene-sqlalchemy-auto
Version: 0.5.0
Summary: generate default graphene schema from sqlalchemy model base on [graphene-sqlalchemy](https://github.com/graphql-python/graphene-sqlalchemy.git)

Home-page: https://github.com/goodking-bq/graphene-sqlalchemy-auto
License: MIT
Author: golden
Author-email: goodking_bq@hotmail.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: graphene-sqlalchemy (>=2.0.0,<3.0.0)
Project-URL: Documentation, https://github.com/goodking-bq/graphene-sqlalchemy-auto
Project-URL: Repository, https://github.com/goodking-bq/graphene-sqlalchemy-auto.git
Description-Content-Type: text/markdown

generate default graphene schema from sqlalchemy model base on [graphene-sqlalchemy](https://github.com/graphql-python/graphene-sqlalchemy.git)

# Installation

just run
```shell script
pip install graphene_sqlalchemy_auto
```
# Features

- auto add `offset` `limit` `totalCount` to pagination
- auto add `dbId` for model's database id
- mutation auto return ok for success,message for more information and output for model data


# How To Use
example :
```python
from graphene_sqlalchemy_auto import QueryObjectType,MutationObjectType
from sqlalchemy.ext.declarative import declarative_base
import graphene
from sqlalchemy.orm import sessionmaker

Base = declarative_base() 
Session = sessionmaker()

class Query(QueryObjectType):
    class Meta:
        declarative_base = Base
        exclude_models = ["User"] # exclude models

class Mutation(MutationObjectType):
    class Meta:
        declarative_base = Base
        session=Session() # mutate used
        
        include_object = []# you can use yourself mutation UserCreateMutation, UserUpdateMutation


schema = graphene.Schema(query=Query, mutation=Mutation)

```

about many-to-many mutation

>now you can use schema everywhere.some like flask,fastapi

>also more example you can find in [example](https://github.com/goodking-bq/graphene-sqlalchemy-auto/tree/master/example)
