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

Concrete types of union and interface fields should not be skipped if concrete use elsewhere provides more information #962

Closed
rstoyanchev opened this issue May 3, 2024 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@rstoyanchev
Copy link
Contributor

When SchemaMappingInspector resolves union and interface type to concrete types, and cannot resolve the corresponding Java classes, it should not report them as skipped immediately because there may be other places where the concrete types are used that provide the Java class information.

For example, here only Photo should be reported as skipped:

type Query {
	search: [SearchResult]
	article(id: ID): Article
}

union SearchResult = Article | Photo

type Photo {
	height: Int
	width: Int
}

type Article {
	content: String
}

Given:

@Controller
class SearchController {

	@QueryMapping
	List<Object> search() {
		// ...
	}

	@QueryMapping
	Article article(@Argument Long id) {
		// ...
	}
}
@rstoyanchev rstoyanchev added the type: bug A general bug label May 3, 2024
@rstoyanchev rstoyanchev added this to the 1.3.0 milestone May 3, 2024
@rstoyanchev rstoyanchev self-assigned this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant