Add directives and description to supermassive ast#627
Open
Conversation
d1e286a to
75a1ece
Compare
📊 Benchmark Analysis Report✅ No significant performance changes detected Threshold: 5% change Updated: 2026-01-16T09:56:49.761Z |
ef3c25c to
b84ac8e
Compare
b84ac8e to
587585c
Compare
vladar
reviewed
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for descriptions and directives metadata on GraphQL types, fields, enums, and directives in the
@graphitation/supermassivelibrary and its codegen preset. These changes add new metadata fields to the internal schema representation, update utility functions for handling this metadata, and expand test coverage to ensure correct encoding and decoding of descriptions and directives.Schema Metadata Enhancements:
TypeDefinitionMetadata,EnumTypeDefinitionMetadata, andDirectiveDefinitionMetadata. [1] [2] [3]API and Utility Updates:
getTypeDefinitionMetadata,getObjectTypeMetadata,getEnumMetadata,getDirectiveDefinitionMetadata, and others to access the new metadata fields. [1] [2] [3]Codegen and Integration:
@graphitation/graphql-codegen-near-operation-file-preset-with-resolver-metadatato leverage the new metadata, including changes to how interfaces are handled in resolver metadata extraction. [1] [2] [3] [4]@graphitation/supermassive(minor) and the codegen preset (patch), noting the addition of enum value descriptions and directives. [1] [2]Testing Improvements:
decodeASTSchema.test.tsto verify correct encoding and decoding of descriptions and directives, including new inline snapshots and additional test cases for schemas with descriptions and directives. [1] [2] [3]These changes lay the groundwork for richer schema introspection and improved code generation by preserving and exposing more detailed metadata throughout the schema lifecycle.