Skip to content

[dg] Serialize component type info with code location, add GQL to power in-app docs #29167

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

Merged
merged 7 commits into from
Apr 11, 2025

Conversation

benpankow
Copy link
Member

Summary

Packages up component type JSON into the repository metadata of load_defs, which can be accessed via GraphQL through the new locationDocsJson query, which returns contents identical to the generated JSON which powers dg docs serve.

@benpankow benpankow requested a review from hellendag April 10, 2025 04:53
@benpankow
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Member

@hellendag hellendag left a comment

Choose a reason for hiding this comment

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

Thanks!

snaps = [get_package_entry_snap(key, obj) for key, obj in library_objects.items()]

components_json = json.dumps(json_for_all_components(snaps))
print(components_json)
Copy link
Member

Choose a reason for hiding this comment

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

Just for testing?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yeah, good catch

@benpankow benpankow requested review from smackesey, gibsondan, OwenKephart and alangenfeld and removed request for gibsondan April 10, 2025 16:11
@benpankow benpankow force-pushed the benpankow/gql-for-component-docs branch from d766bfd to 4194250 Compare April 10, 2025 23:05
Copy link

github-actions bot commented Apr 10, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-nclogkt1x-elementl.vercel.app
https://benpankow-gql-for-component-docs.core-storybook.dagster-docs.io

Built with commit 823a7ad.
This pull request is being automatically deployed with vercel-action

@benpankow benpankow force-pushed the benpankow/gql-for-component-docs branch from 4194250 to 328ad7e Compare April 11, 2025 00:10
@benpankow benpankow merged commit ec58c3b into master Apr 11, 2025
7 checks passed
@benpankow benpankow deleted the benpankow/gql-for-component-docs branch April 11, 2025 04:19
hellendag pushed a commit that referenced this pull request Apr 11, 2025
…#29216)

## Summary

Adds a boolean `hasLocationDocs` endpoint which returns whether a
location has integrated docs. Nested under `GrapheneRepository`, along
with moving the endpoint from #29167

## How I Tested These Changes

Update unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants