Skip to content

Commit 17af4b1

Browse files
authored
Merge pull request #158 from puorc/master
Add more description on meta fields for subclassing
2 parents 8872577 + 774ce5a commit 17af4b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ from graphene_sqlalchemy import SQLAlchemyObjectType
4343
class User(SQLAlchemyObjectType):
4444
class Meta:
4545
model = UserModel
46+
# only return specified fields
47+
only_fields = ("name",)
48+
# exclude specified fields
49+
exclude_fields = ("last_name",)
4650

4751
class Query(graphene.ObjectType):
4852
users = graphene.List(User)

0 commit comments

Comments
 (0)