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:expgraphqlschema

Print or write the GraphQL schema of a siteaccess: the schema language (sdl), the introspection result (json) or the classes and their fields (summary).

Download as PDF

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

On this page

exp:expgraphqlschema

Print or write the GraphQL schema of a siteaccess: the schema language (sdl), the introspection result (json) or the classes and their fields (summary).

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

./console exp:expgraphqlschema --help
./console exp:graphql:schema --help
php bin/php/expgraphqlschema.php --help

Help text

Print the GraphQL schema of a siteaccess
sdl (the default): the schema language, for code generators and editors;
json: the introspection result ({ "data": { "__schema": ... } }), as a client reads it;
summary: the classes, their types and fields, the datatype of each field and whether it has a mapping.
The schema is printed whether or not the API is switched on (a schema for development).

./console exp:graphql:schema --siteaccess=site
./console exp:graphql:schema --format=json --output=schema.json

Exit code: 0 printed; 1 the file could not be written; 3 the library is missing; 2 wrong options.

Options

OptionValueHelp
--formatrequiredsdl (the default), json or summary
--outputrequiredwrite to this file instead of the screen

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/expgraphqlschema.php, kernel/private/classes/commands/expgraphqlschema.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