Fixed deprecation warning
authorLaurent Wouters <lwouters@cenotelie.fr>
Thu, 13 Dec 2018 15:15:55 +0100
changeset 7 caf60851619d
parent 6 1d29811213b2
child 8 66fe6779aa70
Fixed deprecation warning
cubicweb_graphql/querier.py
--- a/cubicweb_graphql/querier.py	Thu Dec 13 15:01:22 2018 +0100
+++ b/cubicweb_graphql/querier.py	Thu Dec 13 15:15:55 2018 +0100
@@ -73,11 +73,7 @@
         :param kwargs: The mapping of values for the named variables in the query
         :return: The GraphQL execution result
         """
-        graphql_kwargs = {
-            "context_value": {CONNECTION: connection},
-            "variable_values": kwargs
-        }
-        return self._query_schema.execute(query, **graphql_kwargs)
+        return self._query_schema.execute(query, context={CONNECTION: connection}, values=kwargs)
 
 
 def default_format_error(error):