-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschema.py
83 lines (71 loc) · 2.8 KB
/
schema.py
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import graphene
from graphene_django.debug import DjangoDebug
from django.conf import settings
# Importing for initialization (Make sure to import this before apps.<>)
"""
FYI, NOTE
Make sure use string import outside graphene files.
For eg: In filters.py use 'entry.schema.EntryListType' instead of `from entry.schema import EntryListType'
"""
from .graphene_converter import * # type: ignore # noqa F401
from utils.graphene.resolver import * # type: ignore # noqa F401
from project import schema as pj_schema, mutation as pj_mutation
from lead import public_schema as lead_public_schema
from analysis_framework import mutation as af_mutation, schema as af_schema
from analysis import public_schema as analysis_public_schema
from user import mutation as user_mutation, schema as user_schema
from user_group import mutation as user_group_mutation, schema as user_group_schema
from organization import schema as organization_schema, mutation as organization_mutation
from geo import schema as geo_schema, mutations as geo_mutation
from notification import schema as notification_schema, mutation as notification_mutation
from assisted_tagging import schema as assisted_tagging_schema
from unified_connector import schema as unified_connector_schema
from export import schema as export_schema, mutation as export_mutation
from assessment_registry import mutation as assessment_registry_mutation
from assessment_registry import schema as assessment_registry_schema
from deep_explore import schema as deep_explore_schema
from gallery import mutations as gallery_mutation
from deep.enums import AppEnumCollection
class Query(
pj_schema.Query,
af_schema.Query,
user_schema.Query,
user_group_schema.Query,
organization_schema.Query,
geo_schema.Query,
notification_schema.Query,
lead_public_schema.Query,
unified_connector_schema.Query,
export_schema.Query,
deep_explore_schema.Query,
analysis_public_schema.Query,
assessment_registry_schema.Query,
# --
graphene.ObjectType
):
assisted_tagging = graphene.Field(assisted_tagging_schema.AssistedTaggingRootQueryType)
enums = graphene.Field(AppEnumCollection)
if settings.DEBUG:
_debug = graphene.Field(DjangoDebug, name="_debug")
@staticmethod
def resolve_assisted_tagging(root, info, **kwargs):
return {}
@staticmethod
def resolve_enums(root, info, **kwargs):
return {}
class Mutation(
af_mutation.Mutation,
user_mutation.Mutation,
user_group_mutation.Mutation,
pj_mutation.Mutation,
notification_mutation.Mutation,
export_mutation.Mutation,
gallery_mutation.Mutation,
assessment_registry_mutation.Mutation,
organization_mutation.Mutation,
geo_mutation.Mutation,
# --
graphene.ObjectType
):
pass
schema = graphene.Schema(query=Query, mutation=Mutation)