Skip to content

Conversation

N-Olbert
Copy link
Contributor

@N-Olbert N-Olbert commented Aug 7, 2025

Summary of the changes (Less than 80 chars)

  • Considerd descriptor.Name("...") and [GraphQlName("...")] for ID<Type>
  • This is a breaking change

Closes #6256

@N-Olbert
Copy link
Contributor Author

N-Olbert commented Aug 7, 2025

Related: #6264

@michaelstaib @glen-84 : Did I miss something here? I considered fluent type definition naming and the [GraphQLName] attribute by using the name of the referenced ObjectType after it was created. I couldn’t think of anything else at the moment...

@michaelstaib michaelstaib added this to the HC-16.0.0 milestone Aug 28, 2025
@michaelstaib michaelstaib requested a review from glen-84 August 28, 2025 06:36
@michaelstaib michaelstaib marked this pull request as draft August 28, 2025 06:36
@michaelstaib michaelstaib self-requested a review September 1, 2025 13:25
@@ -195,5 +320,75 @@ public interface IFooPayload
string AnotherId { get; set; }
}

private class Another;
public class Another
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just want to point out this change. Since we now depend on the type to resolve the correct ID–name mapping, the type must be a valid GraphQL type (which is not the case for a private class that won’t be detected by HC).

Probably not relevant for 99.9% of cases, but still breaking.

@N-Olbert N-Olbert requested a review from glen-84 September 1, 2025 18:04
@N-Olbert
Copy link
Contributor Author

N-Olbert commented Sep 1, 2025

I applied the changes from the review, thanks 👍

Regarding the docs: Should this change be mentioned in the migration guide from v15 to v16? I could add it in another PR. The generic ID attribute isnt very popular in the current docs, so maybe that could be reworked as well.

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.

Use GraphQLName when referencing type with ID<Type>
3 participants