Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expgraphqldisable

Switch the GraphQL API, or only its mutations, off for every siteaccess or for some; a dry run unless --apply.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expgraphqldisable.md

On this page

exp:expgraphqldisable

Switch the GraphQL API, or only its mutations, off for every siteaccess or for some; a dry run unless --apply.

Script bin/php/expgraphqldisable.php, code in kernel/private/classes/commands/expgraphqldisable.php. Run it from the installation root, as the user the web server runs as:

./console exp:expgraphqldisable --help
./console exp:graphql:disable --help
php bin/php/expgraphqldisable.php --help

Help text

Switch the GraphQL API off
Sets graphql.ini [GraphQLSettings] Enabled=disabled in settings/override (every siteaccess), or takes
the siteaccesses of --siteaccess out of SiteAccessList[] there (settings/override wins over the files
of a siteaccess; a list that would become empty switches the API off). With --mutations only the
mutations are switched off (MutationsEnabled=disabled; enabled is the default, together with the
API) and the queries keep answering: a read-only API. /api/graphql
then answers 404 (DISABLED); the persisted queries, the keys and the cache stay.
Shows the changes as a diff and writes nothing without --apply.

./console exp:graphql:disable                               what would change
./console exp:graphql:disable --apply
./console exp:graphql:disable --siteaccess=site --mutations --apply

Exit code: 0 done (or shown); 1 a file could not be written; 2 wrong options (an unknown siteaccess).

Options

OptionValueHelp
--siteaccessrequiredonly these siteaccesses, comma separated (default: every siteaccess)
--mutationsswitch only the mutations off (they are on by default): a read-only API
--applywrite; without it nothing is changed

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expgraphqldisable.php, kernel/private/classes/commands/expgraphqldisable.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x