Benedikt Franke

Results 377 comments of Benedikt Franke

We are currently lacking documentation for the [QueryPlan](https://github.com/webonyx/graphql-php/blob/master/src/Type/Definition/QueryPlan.php). @keulinho you provided the initial implementation of this feature, could you a write up a small section for the docs? I think...

> Does the QueryPlan do this then? Not yet, but as @vladar hinted in #453, it may be a useful addition. Without documentation, the usefulness of this class is quite...

How does that allow the errors to be localized?

> we could tweak this a bit and do something similar to type loader, where the client PHP code can register an "error loader" callback. It would receive the error...

I think `sprintf` based translation is fundamentally flawed, sentence structures can differ between languages. I think error message generation has to go through functions, given the dynamic nature of some...

@vladar I agree to wait what the reference implementation does for an official solution. We might still unblock users who currently wish to extend the `SchemaPrinter` by making its `private`...

@fabis94 instead of complaining, you can do something about it and create a PR.

We have been using an extensible version of the `SchemaPrinter` to add federation support for https://github.com/nuwave/lighthouse. See https://github.com/nuwave/lighthouse/blob/master/src/Federation/SchemaPrinter.php for the implementation. Basically, it adds a config option `printDirectives` that takes...

I added a PR to the reference implementation to gauge their interest and avoid a diverging implementation: https://github.com/graphql/graphql-js/pull/3362

@LastDragon-ru seems fine, I would probably do something similar in Lighthouse if we actually needed the definitions to be part of the schema.