Skip to content

Conversation

tninesling
Copy link
Contributor

@tninesling tninesling commented Sep 18, 2025

Summary

Ports the logic for Merger.addArgumentsShallow. The port for mergeDefaultValue will be coming in a separate PR.

New HasArguments trait

In the TS implementation, this method is generic over types which are FieldDefinition or DirectiveDefinition. Since we can't create the same sum type in Rust, I abstracted out the various calls to the AST node which get the arguments we're looking for. Then, we can call add_arguments_shallow on any position which implements that contract. This also includes the implementation of that trait for object field, interface field, and directive definition positions.

Argument positions can now .insert()

The aforementioned trait is implemented using new .insert() methods on the various argument types. These automatically insert the referencers required on insert, so our schema metadata is up-to-date.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@tninesling tninesling requested review from a team as code owners September 18, 2025 18:11
@apollo-librarian
Copy link

apollo-librarian bot commented Sep 18, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 82d259599d536734bfaca637
Build Logs: View logs

Copy link
Contributor

@tninesling, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@tninesling tninesling merged commit 1c9ac32 into dev Sep 23, 2025
14 of 15 checks passed
@tninesling tninesling deleted the tninesling/merge-arguments branch September 23, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants