Skip to content
Syrus Akbary edited this page May 19, 2016 · 7 revisions

Roadmap

Version 1.0

For the next stable version of graphene, we are willing to achieve:

  • Use and extend graphql-core objects and interfaces. Stop replicating logic from graphql_relay.
  • Remove context and info keyword arguments from resolvers, make @resolve_only_args decorator the default.
  • Move graphene.contrib.django to a independent package graphene-django
  • Move graphene.contrib.sqlalchemy to a independent package graphene-sqlalchemy

Simpler resolvers

Currently, all the resolvers have to receive three arguments, self, args, and info. We want to simplify the syntax having only self and **args by default, something be closer to:

class MyObjectType(graphene.ObjectType):
    hello = graphene.String(to=graphene.String())
    other = graphene.String()

    def resolve_hello(self, to):
        return "Hello {}".format(to)

    def resolve_other(self):
        return "Hey!"

Also, resolvers could be able to get the context and info data by using decorators:

class MyObjectType(graphene.ObjectType):
    field_with_info_and_context = graphene.String(to=graphene.String())

    @with_info
    @with_context
    def field_with_info_and_context(self, to, context, info):
        return "Hello {}".format(to)