-
Notifications
You must be signed in to change notification settings - Fork 147
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
Proposal allow aliasing fields #141
Comments
This is going to be more valuable for users of this library with an existing dataset, but want to map the backend property to a different field name on the frontend. These users aren't our current target audience, but I will leave this open as it probably is a feature we should add in the future. |
@darrellwarde You may have a look at lib_directives.graphql. This is how we define the directives in java. This file (and neo4j_types.graphql) are then loaded into the user provided schema: This is especially helpful since the graphql framework will take care about validating the schema and applying default values. |
@Andy2003 in the current implementation we don't type the directives, as untyped means we can offer greater flexibility IMO*, this is up for discussion internally. If you look at the output schema; no sign of directives. The directive metadata is stored on the PS - I think this comment is in the wrong place |
Provide an
@property
directive to change the name used for the database mappings.With schema:
And query:
Should generate something like:
see also: https://github.com/neo4j-graphql/neo4j-graphql-java/blob/master/core/src/test/resources/property-tests.adoc
The text was updated successfully, but these errors were encountered: