mll-lab/graphql-php-scalars
Custom scalar types for webonyx/graphql-php, including BigInt, Date/DateTime/DateTimeTz, Email, JSON, and IntRange for bounded integers. Drop-in types for schema definitions with strict parsing and DateTimeImmutable conversion for date scalars.
Architecture fit is strong as the package is explicitly built for webonyx/graphql-php, the foundational GraphQL library for PHP, ensuring seamless compatibility with any framework leveraging it (e.g., Laravel via Lighthouse). Integration feasibility is high due to drop-in scalar implementations requiring minimal configuration. Technical risk is low for standard use cases but depends on version alignment with webonyx/graphql-php (e.g., compatibility with v1.0+). Key questions include:
DateTime scalars)?Stack fit is excellent for Laravel projects using nuwave/lighthouse or direct webonyx/graphql-php integrations. Migration path involves installing the package via Composer, registering scalars in the GraphQL schema configuration (e.g., adding ScalarTypeRegistry::register(...)), and replacing custom scalar implementations with the package’s types. Compatibility is confirmed for webonyx/graphql-php v1.0+ and PHP 8.0+, but requires validation against existing project dependencies. Sequencing should prioritize:
DateTime instead of custom DateTimeType).Money, JSON).Maintenance is low due to minimal code surface area and MIT licensing (no vendor lock-in), but requires monitoring for webonyx/graphql-php updates that may introduce breaking changes. Support relies on community GitHub issues, with no formal SLA. Scaling is unaffected as scalars are pure type definitions with no runtime overhead. Failure modes include improper validation (e.g., lax Email checks) or unhandled edge cases in serialization, potentially causing API inconsistencies. Ramp-up is minimal for developers familiar with GraphQL scalars, but requires documentation review for specific scalar behaviors (e.g., PositiveInt validation rules).
How can I help you explore Laravel packages today?