exp:expgraphqlschema
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Print or write the GraphQL schema of a siteaccess: the schema language (sdl), the introspection result (json) or the classes and their fields (summary)
Usage
./console exp:expgraphqlschema [options] php bin/php/expgraphqlschema.php [options] ./console exp:graphql:schema [options]
Aliases
exp:graphql:schema
Help
The output of ./console help exp:expgraphqlschema (the script run with --help), without the standard options:
Usage: bin/php/expgraphqlschema.php [OPTION]...
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:
--format=VALUE sdl (the default), json or summary
--output=VALUE write to this file instead of the screenOptions
| Option | Value | Description |
|---|---|---|
| --format | required | sdl (the default), json or summary |
| --output | required | write to this file instead of the screen |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/expgraphqlschema.php, kernel/private/classes/commands/expgraphqlschema.php
See also
Generated example: exp:expgraphqlschema
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment