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

Add labels based on the properties of the node #574

Closed
magaton opened this issue Nov 10, 2021 · 3 comments
Closed

Add labels based on the properties of the node #574

magaton opened this issue Nov 10, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@magaton
Copy link

magaton commented Nov 10, 2021

Is your feature request related to a problem? Please describe.
Having:

type Client {
   id: String!
   login: String!
   name: String!
   type: String!
}

I would like to add a dynamic label equal to client.type in mutation.

Additional context
It would be great if besides $jwt and $context, $this also becomes available in the @node directive

@magaton magaton added enhancement New feature or request inbox labels Nov 10, 2021
@danstarns
Copy link
Contributor

Thank you for this, we have added this to our board internally and shall shape and discuss if it's something to add.

@Kubera2017
Copy link

Similar idea neo4j-graphql/neo4j-graphql-js#567

@angrykoala
Copy link
Member

Hi @magaton
After some discussion, we decided that this kind of use case seems an anti-pattern within a graph database, as any filtering based on labels can be done with properties. This also may lead to an ambiguous schema.

If you have an example use case that we may have not considered, feel free to comment here.

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

5 participants