Mocktail-CLI v1.4.1 - Major Feature Release
🎯 NEW: Extensible Type System
Custom Scalar Support
- GraphQL custom scalars:
EmailAddress,URL,JSON,DateTime,UUID,PhoneNumber, etc. - JSON Schema formats:
email,uri,date-time,uuid,ipv4,hostname, etc. - Context-aware generation: Email addresses now match user names for realistic data
- 50+ built-in generators: Phone numbers, addresses, URLs, dates, and more
Before vs After
# Before v1.4.1: Custom scalars treated as relations
scalar EmailAddress
type User {
email: EmailAddress # Generated: null (treated as relation)
}
# After v1.4.1: Smart type detection
type User {
email: EmailAddress # Generated: "john.doe@example.com"
website: URL # Generated: "https://example.com"
metadata: JSON # Generated: { key: "data", value: "content" }
}🔄 NEW: Advanced Circular Dependency Resolution
Smart Cycle Detection
- Comprehensive analysis: Detects all circular dependencies in complex schemas
- Cycle classification: Self-reference, simple, and complex cycle types
- Strength analysis: Weak (optional) vs strong (required) relationship cycles
- Multiple resolution strategies: Smart-break, lazy-loading, partial-references
Real-World Example
# Complex schema with cycles
mocktail-cli generate --schema complex-schema.graphql --count 3
# Output shows intelligent cycle resolution:
🔄 Detected 3 circular dependencies:
• self-reference cycle: User → User (weak)
• complex-cycle cycle: User → Post → Comment → User (strong)
🛠️ Applied resolution strategy: smart-break
• Deferred 2 relations for later population🔧 Improvements & Fixes
- Enhanced GraphQL parser: Now properly handles 15+ common custom scalar types
- Improved JSON Schema parser: Full format support with realistic generation
- Context-aware generation: Related fields influence each other (emails match names)
- TypeScript fixes: Resolved all linting issues in extensible type system
- Better documentation: Updated README with v1.4+ features and examples
- Professional badges: Added npm version, license, downloads, and CI status badges
📊 Impact
Custom Type Mapping: 4/10 → 9/10
- ✅ GraphQL custom scalars fully supported
- ✅ JSON Schema formats fully supported
- ✅ Context-aware generation
- ✅ Extensible plugin architecture
Circular Dependencies: 5/10 → 9/10
- ✅ Advanced cycle detection
- ✅ Multiple resolution strategies
- ✅ Handles complex multi-node cycles
- ✅ Detailed reporting and analysis
🚀 Getting Started
# Install the latest version
npm install -g mocktail-cli@1.4.1
# Try with a complex GraphQL schema
mocktail-cli generate --schema schema.graphql --count 5 --pretty
# Test circular dependency resolution
mocktail-cli generate --schema complex-schema.graphql --relations --depth 3📚 Documentation
- Updated README with comprehensive v1.4+ feature documentation
- New examples showcasing custom scalars and cycle resolution
- Enhanced roadmap showing completed and future features
Full Changelog: v1.3.3...v1.4.1
Installation: npm install -g mocktail-cli@1.4.1
Try it now with your most complex schemas - mocktail-cli can handle them! 🎯