下载 Gitlab 的 graphql schema
Download Gitlab's graphql schema
我正在尝试获取 gitlab_schema.graphql,即 Gitlab 的 graphql API 的架构。到处都找不到,有没有人指点一下?
看起来 GitLab 并没有直接共享架构,只是这个 Reference Documentation generated from the schema, and the GraphiQL Explorer / IDE (more info about GraphiQL Explorer here).
我发现该模式是 Gitlab CI 管道(graphql-schema-dump 作业)中的一个工件,例如:https://gitlab.com/gitlab-org/gitlab/-/jobs/1602029144.
不完美,但有效。
您可以为此使用 apollo CLI:apollo client:download-schema --endpoint=https://gitlab.yourcompany.com/api/graphql schema.graphql
或仅省略文件名,它将下载到 JSON
我正在尝试获取 gitlab_schema.graphql,即 Gitlab 的 graphql API 的架构。到处都找不到,有没有人指点一下?
看起来 GitLab 并没有直接共享架构,只是这个 Reference Documentation generated from the schema, and the GraphiQL Explorer / IDE (more info about GraphiQL Explorer here).
我发现该模式是 Gitlab CI 管道(graphql-schema-dump 作业)中的一个工件,例如:https://gitlab.com/gitlab-org/gitlab/-/jobs/1602029144.
不完美,但有效。
您可以为此使用 apollo CLI:apollo client:download-schema --endpoint=https://gitlab.yourcompany.com/api/graphql schema.graphql
或仅省略文件名,它将下载到 JSON