laragraph/utils
Utilities for using GraphQL with Laravel, providing the basic building blocks for GraphQL servers. Use with Lighthouse for SDL-first or graphql-laravel for code-first development.
Require the package with Composer (composer require laragraph/utils) and confirm how it is wired into your GraphQL endpoint. This package sits in front of webonyx/graphql-php request parsing, so look first at its request parser/middleware and the tests covering JSON and multipart batch requests. Your first use case should be protecting a GraphQL endpoint from malformed batch payloads: v2.3.2 rejects JSON and multipart bodies that webonyx would otherwise parse as a batch containing non-object entries, preventing a TypeError. Exercise a valid single operation, a valid batch array, and malformed shapes such as {"query":"…","0":"x"} before rolling it out.
query key plus numeric keys as a batch.application/json and multipart/form-data; the v2.3.2 fix applies to both parsing paths.TypeError.{"query":"…","0":"x"} now produce a controlled rejection instead of a TypeError. Update tests and client expectations that previously saw a 500.^2.3.2) if your clients depend on controlled rejection rather than 500s.How can I help you explore Laravel packages today?