Reputation: 5857
After having pushed a schema to Apollo Engine, is it possible to recreate the schema.graphql
that was used to push the schema in the first place?
It seems that the best I can get is a JSON version of the schema with obtained with apollo client:download-schema
.
Upvotes: 0
Views: 94
Reputation: 84687
You can turn any schema introspection result into SDL using the core library:
const { buildClientSchema, printSchema } = require('graphql')
const introspectionResult = require('./schema.json')
const schema = buildClientSchema(introspectionResult)
const sdl = printSchema(schema)
Upvotes: 1