Skip to content

::devMode and ::prodMode with optional parameter? #728

Description

@josefsabl

Maybe the GraphQLite\SchemaFactory::devMode and GraphQLite\SchemaFactory::prodMode could accept an optional parameter like this:

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions