overblog / GraphQLBundle

This bundle provides tools to build a complete GraphQL API server in your Symfony App.
MIT License
783 stars 221 forks source link

Dynamic fields from database #1148

Open viktor073 opened 9 months ago

viktor073 commented 9 months ago
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Version/Branch 1.0.0

I am studying this package in order to apply it in my project. In the project, there is a need for dynamic schema generation based on data from tables (eav). But I couldn't find a way to solve this issue. Tell me if there is such a possibility. If not, will such functionality be provided? It also seems to me that it would be correct to remove the root query and mutation types from graphml files, which may be located in different directories.

Vincz commented 9 months ago

Hi @viktor073. At the moment, it's not possible because we cannot extend the ConfigParserPass and because the class generation is done on warmup.

I started refactoring the configuration of the schema a few years ago, but did not finished it. You can take a look at my fork here: https://github.com/Vincz/GraphQLBundle The idea was to completely isolate the configuration part and to manage it as a regular service. That was to solve this kind of problem and to be able to generate the schema from any source.