docs: add first guide for schema governance series#2267
docs: add first guide for schema governance series#2267sarahxsanders wants to merge 2 commits intographql:sourcefrom
Conversation
|
@sarahxsanders is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
@sarahxsanders is this ready? Do you need feedbacks on this? |
|
@martinbonnin yes this is ready! |
|
Awesome @sarahxsanders ! I'll review now! @benjie @hasparus Do you have access to Vercel to approve the preview? |
Urigo
left a comment
There was a problem hiding this comment.
great work, I won't comment here but some of the comments I've made in the other PR but in high level some of them are related here as well
| type: "separator", | ||
| title: "Schema Governance", | ||
| }, | ||
| "review-and-validate-schema-changes": "", |
There was a problem hiding this comment.
I believe this is an error, the filename is supposed to be schema-review, to avoid breaking routing
| "review-and-validate-schema-changes": "", | |
| "schema-review": "", |
| const fields = types.flatMap(typeName => { | ||
| const type = schema.getType(typeName); | ||
| if ('getFields' in type) { | ||
| return Object.keys(type.getFields()); |
There was a problem hiding this comment.
I'm not certain how important this is but, this part produces an array like ["id", "name", "price"], just bare field names with no type prefix. Then later, it looks up usageData.get("name") instead of usageData.get("Product.name"). So if two types share a field name, they'd collide in the lookup.
| return Object.keys(type.getFields()); | |
| return Object.keys(type.getFields()).map(f => `${typeName}.${f}`); |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Vercel is reporting the same issue as CI, which I believe was addressed in the comments above. |
Description
adds the first guide for the new "schema governance" guides for graphql.org/learn
includes new guide: review and validate schema changes:
Note
next guides are on: