Skip to content

Fix list/connection queries not seeding inner-type objects into the objects bucket#198

Merged
omar2535 merged 8 commits intomainfrom
copilot/fix-ehri-graphql-country-connection
Apr 18, 2026
Merged

Fix list/connection queries not seeding inner-type objects into the objects bucket#198
omar2535 merged 8 commits intomainfrom
copilot/fix-ehri-graphql-country-connection

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

  • Remove unused pytest import from tests/unit/utils/test_objects_bucket_connection.py
  • Remove unused pytest import from tests/unit/compiler/resolvers/test_query_object_resolver.py
  • Fix docstring in graphqler/compiler/resolvers/query_object_resolver.py — "mutations" → "queries"

@omar2535 omar2535 marked this pull request as ready for review April 17, 2026 22:34
Copilot AI review requested due to automatic review settings April 17, 2026 22:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a fuzzing/scheduling failure where list/connection queries (e.g., CountryConnection { items: [Country] }) seeded only the wrapper object into ObjectsBucket, leaving inner domain objects (e.g., Country) unavailable for later ID-based queries and dependency scheduling.

Changes:

  • Always store successful query responses in ObjectsBucket (previously list responses were dropped).
  • Unpack common connection wrapper patterns (items / nodes / edges.node) to store inner objects under their real object type.
  • Annotate compiled queries with a produces inner-type and add dependency-graph edges so list/connection queries are scheduled before queries that depend on the inner object type.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
graphqler/fuzzer/engine/fengine.py Always calls objects_bucket.put_in_bucket(result.data) on query success to avoid dropping list responses.
graphqler/utils/objects_bucket.py Adds connection-wrapper unpacking logic and schema-guided inner-type resolution to seed inner OBJECTs into the bucket.
graphqler/compiler/resolvers/query_object_resolver.py Adds produces annotation for list/connection queries by inspecting wrapper output fields.
graphqler/graph/graph_generator.py Adds “Case 4” edges (Query -> produced inner Object) to improve scheduling/topological ordering.
tests/unit/utils/test_objects_bucket_connection.py New unit tests validating wrapper unpacking (items, nodes, edges.node) and parse_as_object behavior.
tests/unit/compiler/resolvers/test_query_object_resolver.py New unit tests for _resolve_produces across items/nodes/Relay edges cases.
sample-graphql-apis/user-wallet-api/package-lock.json Minor lockfile metadata change (removes a peer flag entry).
Files not reviewed (1)
  • sample-graphql-apis/user-wallet-api/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/utils/test_objects_bucket_connection.py Outdated
Comment thread tests/unit/compiler/resolvers/test_query_object_resolver.py Outdated
Comment thread graphqler/compiler/resolvers/query_object_resolver.py
Copilot AI requested a review from omar2535 April 17, 2026 23:45
Comment thread graphqler/compiler/resolvers/query_object_resolver.py
@omar2535 omar2535 merged commit 9607793 into main Apr 18, 2026
14 checks passed
@omar2535 omar2535 deleted the copilot/fix-ehri-graphql-country-connection branch April 18, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants