graphql / graphql/graphql.github.io

new mini IDE for site using monaco-graphql

未关闭
#952 2 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
💄 Enhancement
主要语言
TypeScript
星标
889
派生
1.5k
平均合并
4 天 12 小时
30 天内合并 PR
21

描述

we should build a new mini-IDE for the docs using `monaco-graphql`, since it's actually screen-reader accessible, supports multiple instances (with shared, single schema fetch) and it already supports most of the new language features that we need to document (correction - the LSP (gls-interface) does not yet have completion support for interfaces implementing interfaces, though validation and highlighting is supported in monaco-graphql. previously this issue claimed we fully supported this language feature).

according to the vscode team, the best way to re-use the same monaco mode instance across multiple editors is by using `editor.setModel()`. this way, the language service instance is built once, and the schema is executed once, and one set of language workers will service all editor panes.

the current `MiniGraphQL` component uses `codemirror-graphql` which takes much more effort to add new language features to, because of the non-LSP interface

also, if we want the embedded demos to execute against swapi-graphql, need to add new language features to that schema as well.

贡献指南

打开贡献指南

调研方向

从当前使用 codemirror-graphql 的 MiniGraphQL 组件开始,研究如何使用 editor.setModel() 让 monaco-graphql 替代它,以共享语言工作线程并获取 schema。完成的标准是:文档包含新的 mini-IDE,并满足所述的可访问性、多实例、验证、高亮和嵌入式演示要求,包括任何必要的 swapi-graphql schema 工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
graphql, typescript
领域
frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。