Skip to content

Make it easier to create a custom GraphQlSource #1086

Closed
@rq-trichins

Description

@rq-trichins

I would like to create a custom GraphQlSource so that I can change out the GraphQlSchema based on user privileges (show one schema for admins and another schema for non-admins). Right now, the GraphQlSource created in GraphQlAutoConfiguration is always a FixedGraphQlSource. I can override the bean, but I have to copy all the code in GraphQlAutoConfiguration if I want the same functionality that already exists.

It would be nice if there was a way to have GraphQlAutoConfiguration create a non FixedGraphQlSource. One possible idea is to not have it call GraphQlSource.schemaResourceBuilder() but instead have that be a bean that can then be overridden. Or add a customizer that can take the generated FixedGraphQlSource and generate a custom GraphQlSource based on it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions