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

Config to change the default behavior of the schema configuration #3546

Open
AccsoSG opened this issue Jun 23, 2023 · 1 comment
Open

Config to change the default behavior of the schema configuration #3546

AccsoSG opened this issue Jun 23, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@AccsoSG
Copy link

AccsoSG commented Jun 23, 2023

Is your feature request related to a problem? Please describe.
The new options for schema configuration with the directives "query", "mutation", "subscription", as well as "selectable", "settable" and "relationship" are a real help. Thanks for the great features!

However, we have a large schema with many types and relationships. This generates a huge schema, much of which is actually not needed or even actually not wanted. With the new directives you can turn all this off, but of course it would be nice if you could customize the default behavior of the directives via a config.

For example, I'm thinking of the following: I would like to prevent the nested creation of objects in general. In the default behavior the nestedOperations property of the relationship directive allows everything for now. I would have to modify hundreds of relationship directives to meet my requirement. More precisely, I would like to customize the default behavior to have a very limited API for now. By explicit configuration I can then extend the API in certain places. For specific relationships I could allow the nested creation of objects.

Describe the solution you'd like
Maybe an extension of the Neo4jFeaturesSettings would be the right place for this.

@AccsoSG AccsoSG added the enhancement New feature or request label Jun 23, 2023
@MacondoExpress
Copy link
Contributor

Hi @AccsoSG , It's good to hear that the new Schema Configuration directives are already in use!
We also agree to move towards an opt-in solution, we're going in that direction in the 4.0.0 branch where we will have some breaking changes like the aggregations that are no longer generated by default. We wanted to let users get used to these directives and then slowly move to an opt-in approach in the future versions of the library. We have also been considering allowing users to configure the default types generated using Neo4jFeaturesSettings at some point in the future although this isn't an immediate priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants