It doesn't give differences directly, but running it twice (once per environment) provides the ability to compare the differences in output. It's easier for external tools to compare the output of the API call than the contents of an unzipped export.
The examples in my last note only give the high-level definitions, such as differences in the arrangement or names of pipelines, paths and stages, such as "Item X" wasn't promoted to a higher environment yet. Are you looking to also compare the stage definitions too, such as nodes within an Analysis, fields within Data Store, etc.? If so, that's also possible by adding one more "definition" field to the API call, such as the examples below:
All environments, pipelines, paths and stages
query {
envs {
edges {
node {
name
pipelines {
edges {
node {
name
paths {
name
stages {
edges {
node {
stageType
name
definition {
def
displayName
envId
lastUpdateTimestamp
latestVersion
stageId
stageType
tenantId
uid
version
}
}
}
}
}
}
}
}
}
}
}
}
A single environments, pipelines, paths and stages
Note that the environment name will need to be manually updated:
query {
pipelines(envNameOrId: "YOUR_ENV_NAME") {
edges {
node {
name
paths {
name
stages {
edges {
node {
stageType
name
definition {
def
displayName
envId
lastUpdateTimestamp
latestVersion
stageId
stageType
tenantId
uid
version
}
}
}
}
}
}
}
}
}