feat: add service SDL resolver ... can be bad
This commit is contained in:
parent
f449684bbf
commit
901e6c8090
|
@ -7,6 +7,7 @@ from resolvers.messages import (
|
||||||
)
|
)
|
||||||
from resolvers.load import load_chats, load_messages_by, load_recipients
|
from resolvers.load import load_chats, load_messages_by, load_recipients
|
||||||
from resolvers.search import search_recipients
|
from resolvers.search import search_recipients
|
||||||
|
from resolvers.service import resolve_service
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -22,4 +23,5 @@ __all__ = [
|
||||||
"mark_as_read",
|
"mark_as_read",
|
||||||
"load_recipients",
|
"load_recipients",
|
||||||
"search_recipients",
|
"search_recipients",
|
||||||
|
"resolve_service",
|
||||||
]
|
]
|
||||||
|
|
|
@ -127,5 +127,6 @@ load_resolvers = {
|
||||||
"loadRecipients": load_recipients,
|
"loadRecipients": load_recipients,
|
||||||
"loadMessagesBy": load_messages_by,
|
"loadMessagesBy": load_messages_by,
|
||||||
"loadChats": load_chats,
|
"loadChats": load_chats,
|
||||||
|
"_service": resolve_service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,5 +74,6 @@ search_resolvers = {
|
||||||
"Query": {
|
"Query": {
|
||||||
"searchMessages": search_in_chats,
|
"searchMessages": search_in_chats,
|
||||||
"searchRecipients": search_recipients,
|
"searchRecipients": search_recipients,
|
||||||
|
"_service": resolve_service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
resolvers/service.py
Normal file
4
resolvers/service.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
def resolve_service(*_):
|
||||||
|
# For now, return a placeholder SDL.
|
||||||
|
sdl = "type Query { _service: _Service } type _Service { sdl: String }"
|
||||||
|
return {"sdl": sdl}
|
|
@ -10,4 +10,4 @@ def serialize_datetime(value):
|
||||||
|
|
||||||
query = QueryType()
|
query = QueryType()
|
||||||
mutation = MutationType()
|
mutation = MutationType()
|
||||||
resolvers = [query, mutation, datetime_scalar]
|
resolvers = [query, mutation, datetime_scalar, ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user