operationManifestFormat

abstract val operationManifestFormat: Property<String>

The format to output for the operation manifest. Valid values are:

  • "operationOutput": a manifest that matches the format used by OperationOutputGenerator

  • "persistedQueryManifest": a manifest format for an upcoming GraphOS feature

  • nothing (Default): by default no manifest is generated

"operationOutput" uses a JSON format like so:

{
"3f8a446ab7672c1efad3735b6fa86caaeefe7ec47f87fca9b84e71e0d93e6bea": {
"name": "DroidDetails",
"source": "query DroidDetails { species(id: \"c3BlY2llczoy\") { id name filmConnection { edges { node { id title } } } } }"
},
"e772cb55495ad5becc0c804ca3de7d5a5f31f145552bc33529f025d6cb0a8ce6": {
"name": "AllFilms",
"source": "query AllFilms { allFilms(first: 100) { totalCount films { title releaseDate } } }"
}
}

"persistedQueryManifest" uses a format compatible with an upcoming GraphQL feature like so:

{
"format": "apollo-persisted-query-manifest",
"version": 1,
"operations": [
{
"id": "dc67510fb4289672bea757e862d6b00e83db5d3cbbcfb15260601b6f29bb2b8f",
"body": "query UniversalQuery { __typename }",
"name": "UniversalQuery",
"type": "query"
},
{
"id": "f11e4dcb28788af2e41689bb366472084aa1aa1e1ba633c3d605279cff08ed59",
"body": "query FragmentedQuery { post { ...PostFragment } } fragment PostFragment on Post { id title }",
"name": "FragmentedQuery",
"type": "query"
},
{
"id": "04649073787db6f24b495d49e5e87526734335a002edbd6e06e7315e302af5ac",
"body": "mutation SetNameMutation($name: String!) { setName($name) }",
"name": "SetNameMutation",
"type": "mutation"
}
]
}