-
Notifications
You must be signed in to change notification settings - Fork 85
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
Feature: Schema Ownership #2818
Comments
Related: #2747 |
I wanted to add some suggestions which would work good in our organization:
I love the idea with schema approvals built into the tool. Our setup at the moment is that we have internal schema governor Github team which owns generated |
I think we should probably solve this with schema directives, something like the following: type User @codeOwners(teams: ["team-1"]) {
id: ID!
posts: PostConnection! @codeOwners(teams: ["team-2", "team-3"])
} |
Apollo Federation also supports schema ownership through directives: https://www.apollographql.com/docs/technotes/TN0036-owner-pattern/ directive @owner(team: String!) on OBJECT |
Thanks, I see that it's only for Federation v2 though but it's definitely good to know. Do you happen to know if GraphQL Fusion spec will suport such directive? Anyway I think we're talking about two related things here but maybe it's important to make the distinction
I think for 2a. leveraging
|
Option 1: We can use the codebase itself to parse
CODEOWNERS
files.Option 2: Allow parsing the schemas with something like:
Option 3: we can use the Hive CLI for scanning CODEOWNERS in the
fs
and then annotate the schema with the GraphQL comment from option 2.This way we can introduce:
type
, we can notify the owner of that type/service that the type was used.The text was updated successfully, but these errors were encountered: