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

Unable to generate Federation schema with no @Query functions #2110

Open
nicholassmith opened this issue May 16, 2024 · 0 comments · May be fixed by #2113
Open

Unable to generate Federation schema with no @Query functions #2110

nicholassmith opened this issue May 16, 2024 · 0 comments · May be fixed by #2113

Comments

@nicholassmith
Copy link

Maybe this is a bit edge case but it's valid for federation and I can't quite figure out how to achieve it. I would like to generate a schema like:

union _Entity = Shelf

type Books {
   name: String!
   shelf: Shelf
....

"Query root"
type Query {
   _entities(representations: [_Any!]!): [_Entity]!
   _service: _Service!
}

...

However with smallrye-graphql I need at least 1 query for it to build the schema and then invoke the Federation transformer to add the additional entities query that allows for this usecase. The only thing I can think of is that when it checks schema.hasOperations()) in Bootstrap.java it should also check to see if it will generate the entities query.

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 a pull request may close this issue.

1 participant