-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(properties) Add upsertStructuredProperties graphql endpoint for assets #9906
feat(properties) Add upsertStructuredProperties graphql endpoint for assets #9906
Conversation
@@ -0,0 +1,171 @@ | |||
package com.linkedin.datahub.graphql.resolvers.structuredproperties; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic in this resolver seems like duplicate work to support replacing a structured property. This might be better using the structured property patch builder for this work. Or the generic patch builder. The patch support for structured properties was built to add/remove/replace structured property values on entities. The read current value and mutate is inherent in the patch operation for many kinds of aspects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving UI
tried out the patch builder and it is actually not working right now for structured properties (throws errors when trying to ingest the change proposals it creates saying this isn't backed by a data map). I don't have time to fix the patch builder but since I know the code I wrote works and is tested, I'm going to merge. We can refactor later once the patch builder is fixed. |
This PR adds a new graphQL endpoint that will allow us to add or update new or existing structured properties onto an entity. If you provide a structured property update in the input that already exists on the entity, we will change the values. If that property doesn't exist yet, we'll add it.
This PR also introduces a new policy specifically for whether or not the user has the privilege to edit properties on entities. If they don't have this property, we will throw an unauthorized error in this new resolver.
Checklist