Skip to content

1.1.0

Compare
Choose a tag to compare
@github-actions github-actions released this 03 Oct 06:56
· 96 commits to master since this release
c76fda1

[1.1.0] -- 2019-10-02

Added

  • ISSUE-55 - Add
    a new optional context_factory parameter to the register_graphql_handlers
    function. This parameter can take a coroutine function which will be called on
    each request with the following signature:
    async def context_factory(
        context: Dict[str, Any], req: "aiohttp.web.Request"
    ) -> Dict[str, Any]:
        """
        Generates a new context.
        :param context: the value filled in through the `executor_context`
        parameter
        :param req: the incoming aiohttp request instance
        :type context: Dict[str, Any]
        :type req: aiohttp.web.Request
        :return: the context for the incoming request
        :rtype: Dict[str, Any]
        """

The aim of this function will be to returns the context which will be forwarded
to the Tartiflette engine on the execute or subscribe method.