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

omit invalid naptime resource schemas in graphql schema builder #286

Conversation

srolel
Copy link

@srolel srolel commented Mar 31, 2022

This PR changes SangriaGraphQlSchemaBuilder so that it is able to compose a schema for multiple resources, even if one or more of them do not pass validation, by excluding resources with invalid schemas before composing.

@srolel srolel marked this pull request as ready for review April 5, 2022 17:55
@sonarcloud
Copy link

sonarcloud bot commented Apr 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@@ -66,10 +70,26 @@ class SangriaGraphQlSchemaBuilder(resources: Set[Resource], schemas: Map[String,
val schemaErrors = topLevelResourceObjectsAndErrors.foldLeft(SchemaErrors.empty)(_ ++ _.errors)

val dedupedResources = topLevelResourceObjects.groupBy(_.name).map(_._2.head).toList

// first, try to individually generate graphql schemas from each resource, and discard

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 have references to our internal tools in the OSS repo.

Should this be an option? We should maintain compatibility with existing integrations. Alternatively, we could potentially have a 2nd implementation to provide this functionality.

@srolel srolel closed this Jul 17, 2023
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.

None yet

2 participants