graphql-python / graphene-sqlalchemy

Graphene SQLAlchemy integration
http://docs.graphene-python.org/projects/sqlalchemy/en/latest/
MIT License
974 stars 225 forks source link

Default sort #398

Open andrewvasilchuk opened 10 months ago

andrewvasilchuk commented 10 months ago

It would be great if SQLAlchemyObjectType allowed to configure a default_value of a #sort_argument method result.

def sort_argument_for_object_type(
  # ...
  return Argument(List(enum), default_value=enum.default)

Right now there is no way to configure the default_value of the Argument.

erikwrede commented 7 months ago

Great Idea! Wanna push a PR for this? 🙂