We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe the GraphQLite\SchemaFactory::devMode and GraphQLite\SchemaFactory::prodMode could accept an optional parameter like this:
GraphQLite\SchemaFactory::devMode
GraphQLite\SchemaFactory::prodMode
function devMode(bool $v = true); function prodMode(bool $v = true);
This way, instead of:
$schemaFactory ->addNamespace ->setFinder(...); if (DEV_MODE) { $schemaFactory->devMode(); } else { $schemaFactory->prodMode(); }
One could simply write:
$schemaFactory ->addNamespace ->setFinder(...); ->devMode(DEV_MODE);
The text was updated successfully, but these errors were encountered:
Hello @josefsabl. What's the need behind your proposal?
Sorry, something went wrong.
@josefsabl I agree that the API is unfortunate... This wouldn't be a BC break and I'm open to a PR. Thanks.
Yeah I noticed that one too. devMode could just default to false, and accept a default parameter of true:
devMode
false
true
class SchemaFactory { private bool $devMode = false; public function devMode(bool $value = true): self { $this->devMode = $value; return $this; } }
No branches or pull requests
Maybe the
GraphQLite\SchemaFactory::devMode
andGraphQLite\SchemaFactory::prodMode
could accept an optional parameter like this:This way, instead of:
One could simply write:
The text was updated successfully, but these errors were encountered: