Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以从上传到Apollo引擎的模式中重新创建'schema.graphql'文件?_Graphql_Apollo - Fatal编程技术网

是否可以从上传到Apollo引擎的模式中重新创建'schema.graphql'文件?

是否可以从上传到Apollo引擎的模式中重新创建'schema.graphql'文件?,graphql,apollo,Graphql,Apollo,在拥有Apollo引擎的模式后,是否可以重新创建最初用于推送模式的schema.graphql 似乎我能得到的最好的模式是JSON版本,使用获得。您可以使用核心库将任何模式内省结果转换为SDL: const { buildClientSchema, printSchema } = require('graphql') const introspectionResult = require('./schema.json') const schema = buildClientSchema(int

在拥有Apollo引擎的模式后,是否可以重新创建最初用于推送模式的schema.graphql


似乎我能得到的最好的模式是JSON版本,使用获得。

您可以使用核心库将任何模式内省结果转换为SDL:

const { buildClientSchema, printSchema } = require('graphql')
const introspectionResult = require('./schema.json')

const schema = buildClientSchema(introspectionResult)
const sdl = printSchema(schema)

Apollo文章解释了所有三种graphql表示格式: