When using the graphman collection graphql calls is working fine in our environment running Gateway version 11.1.1.
But the same call and collection on an environment with Gateway version 11.0.0, we get errors:
{
"errors": [
{
"message": "Validation error of type FieldUndefined: Field 'servicesByResolutionPath' in type 'Query' is undefined @ 'servicesByResolutionPath'",
"locations": [
{
"line": 2,
"column": 5
}
],
"extensions": {
"classification": "ValidationError"
}
}
]
}
CA API Gateway 11.0 CR02, CR03
CA API Gateway 11.1.x
graphman-client-1.1.00
There are multiple schemas and you must use a compliant schema based on your Gateway version
So Gateway 11.0CR02 and older require a lower version of graphman
1. Select the proper postman collection available from Graphman_Releases - for this case, download the file from the 1.1.00 Release into the Source code(tar.gz) or into the Source code(zip) file (the postman folder is needed)
2. Import the postman collection from Postman/Bruno Apps
3. Configure your Postman/Bruno environment and variables like {{sourceGateway}} or {{targetGateway}} to point the gateway server you need to export from.
ie : sourceGateway= "https://<myGatewayServerName>:8443/graphman"
4. You can test using "Bundles and Migrations" POST call or "Config entities (CRUD)" calls available from the Postman Collection.
If working with graphman CLI (command line) commands
1. Edit the graphman.configuration file from graphman-client-1.1.00 folder and configure like example below
{
"sourceGateway": {
"address": "https://<SourceGatewayServerName>:8443/graphman",
"username": "<AdministrativeUserName>",
"password": "<AdministrativePass>",
"rejectUnauthorized": false,
"passphrase": "<EncryptionSecret>"
},
"targetGateway": {
"address": "https://<DestGatewayServerName>:8443/graphman",
"username": "<AdministrativeUserName>",
"password": "<AdministrativePass>",
"rejectUnauthorized": false,
"passphrase": "<EncryptionSecret>"
}
}
2. Prepare your Workspace,
Run the following to initialize your GRAPHMAN_HOME :
graphman config --init-home /Users/graphman-client-1.1.00
Ensure that GRAPHMAN_HOME is pointing to the working folder (graphman-client-1.1.00)
3. Check the graphman version and schema is the expected one in your workspace, v1.1 , using :
MacOS , Linux : ./graphman.sh
Windows : ./graphman.bat
The output expected for this example and version:
graphman v1.1 [schemaVersion=v10.1-CR04]
4. Run the export using a command like below to export a folder.
./graphman.sh export --gateway <sourceGateway> --using folder --variables.folderPath <Cases110> --output <Folder110CR02_ExportedUsingGph1_1.json>