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

feat(graphql-plugins): add ability for plugins to call back to core e… #8449

Merged

Conversation

shirshanka
Copy link
Contributor

…ngine

It is useful for plugins to be able to get common pieces from the core engine like existing loadableTypes etc, to extend the graphQL model easily.

Adding facilities for that.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jul 18, 2023
Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@shirshanka shirshanka merged commit 58125d3 into datahub-project:master Jul 19, 2023
30 of 31 checks passed
@shirshanka
Copy link
Contributor Author

merging this because CI failures are unrelated.

@sachinsaju
Copy link
Contributor

@shirshanka
The idea of GmsGraphQLPlugin is

An interface that allows the Core GMS GraphQL Engine to be extended without requiring
code changes in the GmsGraphQLEngine class if new entities, relationships or resolvers
need to be introduced. This is useful if you are maintaining a fork of DataHub and
don't want to deal with merge conflicts.

Now for adding this plugin to Datahub GMSGraphEngine, I have to add in the constructor of GmsGraphQLEngine

    this.graphQLPlugins = List.of(
            // Add new plugins here
    );

But this would in future cause merge conflicts right? Or is there any other way to add the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants