From c15ce935427099d59de4a773805e3cbda42e2dea Mon Sep 17 00:00:00 2001 From: Markus Padourek Date: Mon, 12 Sep 2016 09:25:38 +0100 Subject: [PATCH 1/2] Export union type directly. --- graphene/__init__.py | 4 +++- graphene/types/__init__.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/graphene/__init__.py b/graphene/__init__.py index 089d4765..5cbd2ab9 100644 --- a/graphene/__init__.py +++ b/graphene/__init__.py @@ -30,7 +30,8 @@ if not __SETUP__: List, NonNull, Enum, Argument, - Dynamic + Dynamic, + Union, ) from .relay import ( Node, @@ -62,6 +63,7 @@ if not __SETUP__: 'NonNull', 'Argument', 'Dynamic', + 'Union', 'resolve_only_args', 'Node', 'is_node', diff --git a/graphene/types/__init__.py b/graphene/types/__init__.py index c7411ff9..179c6f6d 100644 --- a/graphene/types/__init__.py +++ b/graphene/types/__init__.py @@ -13,6 +13,7 @@ from .inputfield import InputField from .argument import Argument from .inputobjecttype import InputObjectType from .dynamic import Dynamic +from .union import Union __all__ = [ @@ -33,5 +34,6 @@ __all__ = [ 'Boolean', 'List', 'NonNull', - 'Argument' - 'Dynamic'] + 'Argument', + 'Dynamic', +] From 3888307f89ec9e3bcb576fd528a6f828e0bd762a Mon Sep 17 00:00:00 2001 From: Markus Padourek Date: Mon, 12 Sep 2016 09:31:22 +0100 Subject: [PATCH 2/2] Added GlobalID as well. --- graphene/__init__.py | 2 ++ graphene/relay/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/graphene/__init__.py b/graphene/__init__.py index 5cbd2ab9..5afc4f97 100644 --- a/graphene/__init__.py +++ b/graphene/__init__.py @@ -36,6 +36,7 @@ if not __SETUP__: from .relay import ( Node, is_node, + GlobalID, ClientIDMutation, Connection, ConnectionField, @@ -67,6 +68,7 @@ if not __SETUP__: 'resolve_only_args', 'Node', 'is_node', + 'GlobalID', 'ClientIDMutation', 'Connection', 'ConnectionField', diff --git a/graphene/relay/__init__.py b/graphene/relay/__init__.py index 353cbf1f..8cc26ebf 100644 --- a/graphene/relay/__init__.py +++ b/graphene/relay/__init__.py @@ -1,10 +1,11 @@ -from .node import Node, is_node +from .node import Node, is_node, GlobalID from .mutation import ClientIDMutation from .connection import Connection, ConnectionField, PageInfo __all__ = [ 'Node', 'is_node', + 'GlobalID', 'ClientIDMutation', 'Connection', 'ConnectionField',