diff --git a/caluma/caluma_core/tests/test_pagination.py b/caluma/caluma_core/tests/test_pagination.py index a97137ae5..db10d9e7c 100644 --- a/caluma/caluma_core/tests/test_pagination.py +++ b/caluma/caluma_core/tests/test_pagination.py @@ -85,3 +85,26 @@ def test_offset_pagination( assert not result.errors assert len(result.data["allQuestions"]["edges"]) == expected_count + + +def test_no_default_limit(db, schema_executor, question_factory): + question_factory.create_batch(120) + + query = """ + query { + allQuestions { + totalCount + edges { + node { + id + } + } + } + } + """ + + result = schema_executor(query) + + assert not result.errors + assert result.data["allQuestions"]["totalCount"] == 120 + assert len(result.data["allQuestions"]["edges"]) == 120 diff --git a/caluma/settings/caluma.py b/caluma/settings/caluma.py index 26db9a804..874f1367b 100644 --- a/caluma/settings/caluma.py +++ b/caluma/settings/caluma.py @@ -46,7 +46,11 @@ def default(default_dev=env.NOTSET, default_prod=env.NOTSET): # GraphQL -GRAPHENE = {"SCHEMA": "caluma.schema.schema", "MIDDLEWARE": []} +GRAPHENE = { + "SCHEMA": "caluma.schema.schema", + "MIDDLEWARE": [], + "RELAY_CONNECTION_MAX_LIMIT": None, +} # OpenID connect