Skip to content
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

federated-graph: do not render empty types, empty enums in SDL #1720

Merged

Conversation

tomhoule
Copy link
Contributor

They are not valid GraphQL. It's better to render an empty string, so let's do that.

closes GB-6715

Copy link

linear bot commented May 15, 2024

for (idx, object) in graph.objects.iter().enumerate() {
let object_name = &graph[object.name];
let is_query_root = graph.root_operation_types.query == ObjectId(idx);

if let Some(description) = object.description {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The diff is not very readable from here, but it's just a bunch of code moving inside an if block.

@tomhoule tomhoule marked this pull request as ready for review May 15, 2024 16:58
@tomhoule tomhoule requested a review from a team as a code owner May 15, 2024 16:58
@tomhoule tomhoule requested a review from obmarg May 15, 2024 16:58
They are not valid GraphQL. It's better to render an empty string, so
let's do that.

closes GB-6715
@tomhoule tomhoule force-pushed the gb-6715-empty-federated-graphs-still-have-invalid-schemas-in branch from 40835fc to 9be13a6 Compare May 16, 2024 04:38
@tomhoule tomhoule merged commit d450180 into main May 16, 2024
21 checks passed
@tomhoule tomhoule deleted the gb-6715-empty-federated-graphs-still-have-invalid-schemas-in branch May 16, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants