Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Graphql Php Scalars Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • What is the test coverage for edge cases (e.g., invalid UUID formats, timezone handling in DateTime scalars)?
  • How does the package handle schema introspection and error reporting for malformed inputs?
  • Are there known issues with specific PHP versions (e.g., 8.1+)?

Integration Approach

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:

  1. Install package and validate dependencies.
  2. Update schema definitions to use package scalars (e.g., DateTime instead of custom DateTimeType).
  3. Test validation logic for critical fields (e.g., Money, JSON).

Operational Impact

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).

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport