Repository navigation
Conversation
…rator - Add schemaconverter to translate GraphQL types to UTCP JsonSchema - Support auto-generation of selection sets and polymorphic union fragments - Dynamically infer variable types and operation types from introspected schema - Add comprehensive offline unit tests and integration tests
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
…ecution
- Execution correctness:
* Check session.execute parameter compatibility before execution; remove
broad try-except fallback to prevent mutations from executing twice on TypeError.
* Resolve fields in configured operation_type root first before falling back,
preventing query/mutation name collisions.
- Selection set generator:
* Fall back to { __typename } when depth limits or objects lack scalar fields,
preventing invalid bare-field syntax.
* Recursively generate inline fragments for union fields nested inside object returns.
* Enforce selection_depth >= 1 validation in GraphQLCallTemplate.
- Schema converter:
* Preserve GraphQL nullability (type=[T, "null"] for nullable, type=T for NonNull).
* Build union output schemas using member-specific oneOf schemas.
* Support unconstrained types (object, array, string, number, boolean, null) for
JSON scalar and reserve object for JSONObject.
* Exclude defaulted NonNull arguments and input fields from required list.
- Tests:
* Add regression tests for duplicate mutations, root precedence, nested unions,
nullability, defaulted arguments, JSON scalars, and depth boundaries.
* Assert recursion cutoff properties is None in input cycle tests and assert
complete bounded selection string in selection cycle tests.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
… schemas to prevent oneOf overlap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Adds a GraphQL schema converter that generates UTCP JSON Schemas from introspected GraphQL types, and auto-generates selection sets so auto-built queries work for object-returning fields.
Previously, registered tools had empty
objectinput/output schemas, and auto-generated queries for object-returning fields failed with missing selection set errors. Now field arguments and return types map to JSON Schemas preserving GraphQL nullability, unions render as member-specificoneOfwith required__typenamediscriminators, and variable types and operation types are inferred from the schema. Selection sets are generated up to a configurable depth with union fragments and__typenamefallbacks. You can override the generated selection per call with_fieldsor_selectionarguments, or disable generation entirely withauto_generate_selection_set=False.schema_converter.pywith GraphQL type converters, selection set generation, and union fragment support.auto_generate_selection_setandselection_depth(validated ≥ 1) options toGraphQLCallTemplate.session.executecompatibility is checked before execution, preventing duplicate mutation runs onTypeError.Written for commit e8d022f. Summary will update on new commits.