Skip to content

feat: add lte method for connectors mapping language #7722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

andrewmcgivery
Copy link
Contributor

Add lte method for connectors mapping language)


Checklist

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

  • 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

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.

@andrewmcgivery andrewmcgivery requested a review from a team as a code owner June 17, 2025 22:50
Copy link
Contributor

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

@apollo-librarian
Copy link

apollo-librarian bot commented Jun 17, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* (developer-tools)/apollo-mcp-server/(latest)/best-practices.mdx

Build ID: 083c564afe6091bbd6e5e382

URL: https://www.apollographql.com/docs/deploy-preview/083c564afe6091bbd6e5e382

@andrewmcgivery andrewmcgivery marked this pull request as draft June 18, 2025 20:30
@andrewmcgivery andrewmcgivery marked this pull request as ready for review June 18, 2025 23:29
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

Looking good with a few last details to tie up!

match (data, &value) {
// Number comparisons
(JSON::Number(left), JSON::Number(right)) => {
left.as_f64().unwrap_or(0.0) <= right.as_f64().unwrap_or(0.0)
Copy link
Member

@benjamn benjamn Jun 20, 2025

Choose a reason for hiding this comment

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

I don't think substituting 0.0 here is a good idea, especially since it returns true if both unwrappings fail. Let's return false with an error if either conversion fails?

| (ShapeCase::String(_), ShapeCase::String(_)) => {
Shape::bool(method_name.shape_location(source_id))
}
_ => Shape::error(
Copy link
Member

Choose a reason for hiding this comment

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

This makes it an error if the input shape is ShapeCase::Name, which could become/represent a number at runtime. Instead of lumping that case into the _ => Shape::error branch, let's make it explicit.

);

match (arg_shape.case(), input_shape.case()) {
(ShapeCase::Unknown, ShapeCase::Unknown)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should require both shapes to be Unknown here. As long as one of the shapes is among the allowed cases below, the other shape can be Unknown. Of course both Unknown is also allowed, just not required.

Copy link
Member

Choose a reason for hiding this comment

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

Possibly similar logic: #7717 (comment)

@benjamn benjamn mentioned this pull request Jun 20, 2025
7 tasks
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.

2 participants