Closed erikwrede closed 1 year ago
Base: 96.36% // Head: 96.39% // Increases project coverage by +0.03%
:tada:
Coverage data is based on head (
1595d4e
) compared to base (d3a4320
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I removed the custom converters for BigInt and updated this class we discussed in slack/email with :
class Cabinet(SQLAlchemyObjectType, CabinetAttribute):
"""Cabinet node."""
class Meta:
"""Define the metadata."""
model = CabinetModel
interfaces = (graphene.relay.Node,)
id_ = ORMField(type_=graphene.BigInt)
Here are the errors:
Jan 26 19:53:57 my.server.name boss-app[3402721]: Traceback (most recent call last):
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/path/to/code/sbin/server/boss-app", line 34, in <module>
Jan 26 19:53:57 my.server.name boss-app[3402721]: from slurpy.server.api import API
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/data/path/to/code/slurpy/server/api/__init__.py", line 39, in <module>
Jan 26 19:53:57 my.server.name boss-app[3402721]: from slurpy.server.api.routes.graphql import API_GRAPHQL
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/data/path/to/code/slurpy/server/api/routes/graphql.py", line 8, in <module>
Jan 26 19:53:57 my.server.name boss-app[3402721]: from slurpy.server.db.schemas import SCHEMA
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/data/path/to/code/slurpy/server/db/schemas.py", line 113, in <module>
Jan 26 19:53:57 my.server.name boss-app[3402721]: class Cabinet(SQLAlchemyObjectType, CabinetAttribute):
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene/types/objecttype.py", line 29, in __new__
Jan 26 19:53:57 my.server.name boss-app[3402721]: base_cls = super().__new__(
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene/utils/subclass_with_meta.py", line 46, in __init_subclass__
Jan 26 19:53:57 my.server.name boss-app[3402721]: super_class.__init_subclass_with_meta__(**options)
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene_sqlalchemy/types.py", line 593, in __init_subclass_with_meta__
Jan 26 19:53:57 my.server.name boss-app[3402721]: super(SQLAlchemyObjectType, cls).__init_subclass_with_meta__(
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene_sqlalchemy/types.py", line 436, in __init_subclass_with_meta__
Jan 26 19:53:57 my.server.name boss-app[3402721]: fields, filters = construct_fields_and_filters(
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene_sqlalchemy/types.py", line 337, in construct_fields_and_filters
Jan 26 19:53:57 my.server.name boss-app[3402721]: field = convert_sqlalchemy_column(
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene_sqlalchemy/converter.py", line 273, in convert_sqlalchemy_column
Jan 26 19:53:57 my.server.name boss-app[3402721]: convert_sqlalchemy_type(column_type, column=column, registry=registry),
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene_sqlalchemy/utils.py", line 206, in __call__
Jan 26 19:53:57 my.server.name boss-app[3402721]: return self.default(*args, **kwargs)
Jan 26 19:53:57 my.server.name boss-app[3402721]: File "/usr/local/lib/python3.8/dist-packages/graphene_sqlalchemy/converter.py", line 295, in convert_sqlalchemy_type
Jan 26 19:53:57 my.server.name boss-app[3402721]: raise TypeError(
Jan 26 19:53:57 my.server.name boss-app[3402721]: TypeError: Don't know how to convert the SQLAlchemy field sy_cabinets.id (<class 'sqlalchemy.sql.schema.Column'>, <class 'sqlalchemy.dialects.mysql.types.BIGINT'>). Please add a type converter or set the type manually using ORMField(type_=your_type)
Jan 26 19:53:57 my.server.name systemd[1]: boss-app.service: Control process exited, code=exited, status=1/FAILURE
After following your advice on slack it loads in my app without error.