Fix for search limit

This commit is contained in:
kaushalvivek
2018-12-10 14:46:04 +05:30
parent d32b7b612a
commit 13bfc5f2f9
2 changed files with 7 additions and 7 deletions

View File

@@ -517,7 +517,7 @@ class Client(object):
return [graphql_to_user(node) for node in j[name]['users']['nodes']]
def searchForPages(self, name, limit=1):
def searchForPages(self, name, limit=10):
"""
Find and get page by its name
@@ -531,7 +531,7 @@ class Client(object):
return [graphql_to_page(node) for node in j[name]['pages']['nodes']]
def searchForGroups(self, name, limit=1):
def searchForGroups(self, name, limit=10):
"""
Find and get group thread by its name
@@ -546,7 +546,7 @@ class Client(object):
return [graphql_to_group(node) for node in j['viewer']['groups']['nodes']]
def searchForThreads(self, name, limit=1):
def searchForThreads(self, name, limit=10):
"""
Find and get a thread by its name

View File

@@ -477,7 +477,7 @@ class GraphQL(object):
"""
SEARCH_USER = """
Query SearchUser(<search> = '', <limit> = 1) {
Query SearchUser(<search> = '', <limit> = 10) {
entities_named(<search>) {
search_results.of_type(user).first(<limit>) as users {
nodes {
@@ -489,7 +489,7 @@ class GraphQL(object):
""" + FRAGMENT_USER
SEARCH_GROUP = """
Query SearchGroup(<search> = '', <limit> = 1, <pic_size> = 32) {
Query SearchGroup(<search> = '', <limit> = 10, <pic_size> = 32) {
viewer() {
message_threads.with_thread_name(<search>).last(<limit>) as groups {
nodes {
@@ -501,7 +501,7 @@ class GraphQL(object):
""" + FRAGMENT_GROUP
SEARCH_PAGE = """
Query SearchPage(<search> = '', <limit> = 1) {
Query SearchPage(<search> = '', <limit> = 10) {
entities_named(<search>) {
search_results.of_type(page).first(<limit>) as pages {
nodes {
@@ -513,7 +513,7 @@ class GraphQL(object):
""" + FRAGMENT_PAGE
SEARCH_THREAD = """
Query SearchThread(<search> = '', <limit> = 1) {
Query SearchThread(<search> = '', <limit> = 10) {
entities_named(<search>) {
search_results.first(<limit>) as threads {
nodes {