-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(GraphQL support): PoC for GraphQL support in datahub-frontend (Queries + Mutations) #2044
feat(GraphQL support): PoC for GraphQL support in datahub-frontend (Queries + Mutations) #2044
Conversation
@@ -170,6 +170,7 @@ private ObjectNode userEntityProps() { | |||
*/ | |||
@Nonnull | |||
|
|||
// What is this good for?? |
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.
This comment will probably only add more confusion. Please open a ticket asking about this instead.
My guess is this is code that was exported from internal code.
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.
This shouldn't have been in here... will remove
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.
Ack this is a PoC, I was just looking through a little. Didn't do a full review, but left a few comments that stood out to me for a production version.
/** | ||
* Constants relating to GraphQL type system & execution. | ||
*/ | ||
public class Constants { |
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.
Nit: Generally try to avoid overly broad classes like this. Imagine this file 10 years from now being 500 lines of ungrouped constants.
Alternatives:
- (Preferred) A lot of this seems inference-able from the actual data models. Probably fine for a PoC, but for final code consider refactoring. Maybe contribute something to GMA to help out with this.
- Have a
TypeNames
,FieldNames
, etc enums or classes to group these constants.
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.
"Maybe contribute something to GMA to help out with this." -- Not sure I'm following this suggestion. Are you proposing we use the Rest.li API models exposed by the GMA API to reference particular fields?
Ideally we can find a way to auto-gen POJOs that included easy access to field names and then remove many of these....
Agree that in the long term this could grow unwieldy, but I generally opt for simplicity + centralization until natural boundaries have time to emerge. IMO, the scoping of this class to the GraphQL package is sufficient for now... I'm not super committed though, open to parsing apart if you feel strongly
@@ -9,6 +9,7 @@ source frontend.env | |||
set +a | |||
|
|||
export JAVA_OPTS=" | |||
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 |
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.
Nit: again, remove for final submission.
return DataLoader.newDataLoader(corpUserBatchLoader); | ||
} | ||
|
||
private DataLoader<String, com.linkedin.dataset.Dataset> createDatasetLoader() { |
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.
Extract these into dedicated classes.
Closing this, since we've moved on from the POC to actual implementation. |
This PR includes a proof-of-concept implementation of GraphQL in datahub-frontend. It is related to the open GraphQL RFC PRs:
Once the details in the RFC are agreed upon, we can work to productionalize the first chunk of GQL work using this PR.
Checklist