-
Notifications
You must be signed in to change notification settings - Fork 6
Describe Command
The describe command provides detailed information about available GraphQL queries and mutations, including their fields, arguments, and structure. It helps users understand what queries are available and how to use them.
graphman describe [--query <query-name>] [--output <output-file>]| Parameter | Description | Default |
|---|---|---|
--query |
Name of the query to describe (supports wildcards) | Lists all queries if omitted |
--output |
File to save the description output | Standard output (console) |
When no --query parameter is provided, the command lists all available queries organized by type:
- Available Queries: Standard GraphQL queries for retrieving data
- Available Mutations: GraphQL mutations for modifying data
- Available In-built Queries: Built-in GraphQL schema queries
When a query name is provided:
- Displays the complete query structure including fields and arguments
- Supports wildcard patterns (e.g.,
service*,*ByName) - Shows matching query names if multiple queries match the pattern
Display all queries, mutations, and built-in queries:
graphman describeSample Output:
available queries:
all
all:summary
services
serviceByName
policies
policyByName
...
available mutations:
install-bundle
delete-bundle
...
available in-built queries:
__schema
__type
...
View the structure of a specific query:
graphman describe --query serviceByNameSample Output:
query serviceByName
query serviceByName($name: String!) {
serviceByName(name: $name) {
name
resolutionPath
enabled
policy {
xml
}
...
}
}
Find all queries matching a pattern:
graphman describe --query "*ByName"Sample Output:
info: query *ByName
info: 5 matches found
serviceByName
policyByName
folderByName
encassConfigByName
clusterPropertyByName
Export query description to a file:
graphman describe --query all --output all-query.gqlFind out what queries are available for exporting data:
graphman describeUnderstand the structure and required arguments for a query before using it:
graphman describe --query policyByNameLocate all queries related to a specific entity type:
graphman describe --query "service*"Generate query documentation for reference:
graphman describe --query all --output docs/all-query.gqlUse as a reference when creating custom queries:
graphman describe --query encassPre-defined queries for common operations:
-
all: Export all Gateway entities -
all:summary: Export summary information for all entities -
services: Export all services -
policies: Export all policies -
serviceByName: Export a specific service by name -
policyByName: Export a specific policy by name
Queries that modify Gateway configuration:
-
install-bundle: Import and install a configuration bundle -
delete-bundle: Delete entities from the Gateway
GraphQL introspection queries:
-
__schema: Query the GraphQL schema structure -
__type: Query information about specific types
- Query names are case-sensitive
- Wildcard patterns use
*to match any characters - The describe command does not connect to a Gateway; it uses local query definitions
- Custom queries stored in the queries directory are also listed
- Mutations are distinguished from regular queries in the output
- export: Use queries to export Gateway configuration
- import: Use mutations to import configuration
- schema: View GraphQL schema information
| Pattern | Matches |
|---|---|
service* |
All queries starting with "service" |
*ByName |
All queries ending with "ByName" |
*policy* |
All queries containing "policy" |
Custom queries can be added to the queries directory and will appear in the describe output:
$GRAPHMAN_HOME/queries/<schema-version>/<query-name>.json
$GRAPHMAN_HOME/queries/<schema-version>/<query-name>.gql