1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
from graphql import (
GraphQLEnumType,
GraphQLInputObjectType,
GraphQLInterfaceType,
GraphQLObjectType,
GraphQLScalarType,
GraphQLUnionType,
)
class GrapheneGraphQLType(object):
"""
A class for extending the base GraphQLType with the related
graphene_type
"""
def __init__(self, *args, **kwargs):
self.graphene_type = kwargs.pop("graphene_type")
super(GrapheneGraphQLType, self).__init__(*args, **kwargs)
class GrapheneInterfaceType(GrapheneGraphQLType, GraphQLInterfaceType):
pass
class GrapheneUnionType(GrapheneGraphQLType, GraphQLUnionType):
pass
class GrapheneObjectType(GrapheneGraphQLType, GraphQLObjectType):
pass
class GrapheneScalarType(GrapheneGraphQLType, GraphQLScalarType):
pass
class GrapheneEnumType(GrapheneGraphQLType, GraphQLEnumType):
pass
class GrapheneInputObjectType(GrapheneGraphQLType, GraphQLInputObjectType):
pass
|