Skip to content

Commit

Permalink
Fix usage of graphene-sqlalchemy type conversion after breaking changes
Browse files Browse the repository at this point in the history
Ref: graphene-sqlalchemy galaxyproject#371
  • Loading branch information
jdavcs committed Dec 19, 2023
1 parent 6a06fab commit 646547b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/tool_shed/webapp/graphql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
SQLAlchemyConnectionField,
SQLAlchemyObjectType,
)
from graphene_sqlalchemy.converter import (
convert_sqlalchemy_hybrid_property_type,
convert_sqlalchemy_type,
)
from graphene_sqlalchemy.converter import convert_sqlalchemy_type
from graphene_sqlalchemy.utils import column_type_eq
from graphql import GraphQLResolveInfo
from sqlalchemy.orm import scoped_session
from typing_extensions import TypedDict
Expand Down Expand Up @@ -67,12 +65,12 @@ class InfoDict(TypedDict):


# Map these Galaxy-ism to Graphene for cleaner interfaces.
@convert_sqlalchemy_type.register(TrimmedString)
@convert_sqlalchemy_type.register(column_type_eq(TrimmedString))
def convert_sqlalchemy_type_trimmed_string(*args, **kwd):
return graphene.String


@convert_sqlalchemy_hybrid_property_type.register(lambda t: t == TrimmedString)
@convert_sqlalchemy_type.register(column_type_eq(lambda t: t == TrimmedString))
def convert_sqlalchemy_hybrid_property_type_trimmed_string(arg):
return graphene.String

Expand Down

0 comments on commit 646547b

Please sign in to comment.