Skip to content

Use with SqlAlchemy classical mapping #286

@eduardomezencio

Description

@eduardomezencio

I'm trying to use graphene-sqlalchemy in a project where classical mapping is used (https://docs.sqlalchemy.org/en/13/orm/mapping_styles.html#classical-mappings). I can see in some reports here (#130 (comment)) that setting Base.query is a needed step to get things working, and there is no declararive base in classical mapping. Is there a way to make this work without having to change the entire code to use declarative mapping?

When I try to make a query I get An error occurred while resolving field Equipment.id graphql.error.located_error.GraphQLLocatedError: 'Equipment' object has no attribute '__mapper__'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions