Skip to content

Commit 0a02aba

Browse files
committed
Document blacklisting
1 parent 388127f commit 0a02aba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Employee(Base):
2929
__tablename__ = 'employee'
3030
id = Column(UUID, primary_key=True)
3131
name = Column(String, nullable=False)
32+
password_hash = Column(String, nullable=False)
3233
```
3334

3435
Next, decorate a type with `strawberry_sqlalchemy_mapper.type()`
@@ -41,7 +42,8 @@ and hybrid properties. For example:
4142
strawberry_sqlalchemy_mapper = StrawberrySQLAlchemyMapper()
4243
@strawberry_sqlalchemy_mapper.type(models.Employee)
4344
class Employee:
44-
pass
45+
__exclude__ = ["password_hash"]
46+
4547

4648
# context is expected to have an instance of StrawberrySQLAlchemyLoader
4749
class CustomGraphQLView(GraphQLView):

0 commit comments

Comments
 (0)