Merged
Conversation
Add interactive GraphQL schema exploration using introspection: - api/graphql.go: IntrospectSchema method and introspection types - api/graphql_test.go: Tests for introspection functionality - internal/cmd/graphql/graphql.go: explore command with --type and --field Commands: - hspt graphql explore - list all available types - hspt graphql explore --type CRM - show fields of a type - hspt graphql explore --type CRM --field contact - show field details Closes #27
Contributor
Author
Test Coverage Assessment for TDDI reviewed the test coverage for this PR. Here's my analysis: Current StateAPI Layer (
Command Layer ( Assessment: Is This Adequate for TDD?The API layer coverage is solid for TDD purposes. The tests cover:
The missing command-layer tests are acceptable given the codebase conventions:
Verdict: Coverage is SufficientFor TDD in this codebase, the pattern is:
The 70.7% overall API package coverage and the specific function coverage above demonstrate sufficient test rigor for the new GraphQL functionality. The untested No blocking concerns from a TDD perspective. |
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.
Summary
Add interactive GraphQL schema exploration using introspection queries.
API Layer (
api/graphql.go)IntrospectSchema()- fetch full schema via introspectionIntrospectionSchema,IntrospectionType,IntrospectionField,IntrospectionArgtypesIntrospectionTypeRef.TypeName()- resolve type references (handles NON_NULL, LIST wrappers)IntrospectionSchema.GetType(name)- find type by nameIntrospectionSchema.GetRootTypes()- filter to queryable types (excludes internal __ types)CLI Commands
hspt graphql explore- list all available typeshspt graphql explore --type CRM- show fields of a specific typehspt graphql explore --type CRM --field contact_collection- show field details with argumentsTests
api/graphql_test.goUsage Examples
Test Plan
make buildpassesmake testpassesmake lintpassesCloses #27