Fix import style for Python 3
authorLaurent Wouters <lwouters@cenotelie.fr>
Wed, 29 Apr 2020 12:02:46 +0200
changeset 13 112639729734
parent 12 37e377d52d81
child 14 b7ea973e38d8
Fix import style for Python 3
cubicweb_graphql/gql_schema.py
cubicweb_graphql/hooks.py
cubicweb_graphql/querier.py
cubicweb_graphql/resolver.py
cubicweb_graphql/views.py
--- a/cubicweb_graphql/gql_schema.py	Wed Apr 08 12:29:09 2020 +0200
+++ b/cubicweb_graphql/gql_schema.py	Wed Apr 29 12:02:46 2020 +0200
@@ -24,7 +24,7 @@
 from graphql.language import ast
 import json
 
-import utils
+from cubicweb_graphql import utils
 
 TYPE_FIELD_META = "_meta"  # Name of the meta field for a GraphQL object type class
 _TYPE_FIELD_SCHEMA = "__schema"  # Attribute name for the reference to the YAMS entity schema from a GraphQL object type
--- a/cubicweb_graphql/hooks.py	Wed Apr 08 12:29:09 2020 +0200
+++ b/cubicweb_graphql/hooks.py	Wed Apr 29 12:02:46 2020 +0200
@@ -19,7 +19,7 @@
 
 from cubicweb.server import hook
 
-from querier import GraphQLQuerier
+from cubicweb_graphql.querier import GraphQLQuerier
 
 
 class GraphQLStartupHook(hook.Hook):
--- a/cubicweb_graphql/querier.py	Wed Apr 08 12:29:09 2020 +0200
+++ b/cubicweb_graphql/querier.py	Wed Apr 29 12:02:46 2020 +0200
@@ -17,11 +17,12 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """Implementation of GraphQL support for CubicWeb"""
 
-from gql_schema import create_graphql_schema
-from resolver import Resolver, CONNECTION
 from graphql.error import format_error as format_graphql_error, GraphQLError
 import six
 
+from cubicweb_graphql.gql_schema import create_graphql_schema
+from cubicweb_graphql.resolver import Resolver, CONNECTION
+
 
 class GraphQLQuerier(object):
     """
--- a/cubicweb_graphql/resolver.py	Wed Apr 08 12:29:09 2020 +0200
+++ b/cubicweb_graphql/resolver.py	Wed Apr 29 12:02:46 2020 +0200
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """Implement the resolver for CubicWeb entities"""
-from gql_schema import FIELD_SUB_SEPARATOR, TYPE_FIELD_META, ARG_UPDATE_OLD, ARG_UPDATE_NEW, ARG_DELETE_FROM
+from cubicweb_graphql.gql_schema import FIELD_SUB_SEPARATOR, TYPE_FIELD_META, ARG_UPDATE_OLD, ARG_UPDATE_NEW, ARG_DELETE_FROM
 
 CONNECTION = "__connection"  # The key for the current connection in the context of a GraphQL query
 _CACHE = "__cache"  # The key for the object cache in the context of a GraphQL query
--- a/cubicweb_graphql/views.py	Wed Apr 08 12:29:09 2020 +0200
+++ b/cubicweb_graphql/views.py	Wed Apr 29 12:02:46 2020 +0200
@@ -23,7 +23,7 @@
 from pyramid.httpexceptions import HTTPUnauthorized
 from pyramid.view import view_config
 
-from querier import GraphQLQuerier, format_execution_result
+from cubicweb_graphql.querier import GraphQLQuerier, format_execution_result
 
 
 @ajaxfunc(output_type='json')