New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: monaco variables json, improved schema & worker loading & monaco api #1997
Conversation
🦋 Changeset detectedLatest commit: 7fb25ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4f2dcf3
to
9a59671
Compare
9a59671
to
2275fca
Compare
Codecov Report
@@ Coverage Diff @@
## main #1997 +/- ##
==========================================
- Coverage 65.70% 63.30% -2.41%
==========================================
Files 85 79 -6
Lines 5106 5276 +170
Branches 1631 1663 +32
==========================================
- Hits 3355 3340 -15
- Misses 1747 1932 +185
Partials 4 4
Continue to review full report at Codecov.
|
@dotansimha sure! i'm just asking folks to review the deploy previews which seem to have vanished :( |
@dotansimha we used alphas before and it was really messy :( I think your approach with using canaries for each PR will be much better |
On TypeScript we generate playgrounds for people to test the PRs against by requesting them in the PR - feels like something similar could happen here where we bundle up an arbitrary build and throw It on netlify/next/whatever? |
@orta we generate three deploy previews for each PR currently, and push them to netlify |
if you look at "deployments" below, they stopped deploying 3 days ago for some reason :/ |
Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com>
- introduce api for diagnosticsOptions for validating variables json - fileMatch schema config option allows multiple schemas - generate jsonSchema in GraphQLWorker - variables diagnostics happen alongside graphql diagnostics - monaco-graphql no longer fetches remote schema - update example to fetch schema - move schema cache to language service - initialize -> initializeMode, no longer async
80418d2
to
73f9198
Compare
73f9198
to
ac68098
Compare
ac68098
to
7fb25ac
Compare
a ton of monaco-graphql changes here, many many breaking changes. API is entirely rewritten.
Changes
monaco-graphql
graphql
as the language ID finally. this defaults to microsoft's provided syntax support and language config (which you can find in themonaco-editor
repository underbasicLangauges
).monaco-editor
, and we will serve as a full language worker implementation that extends their basic configuration.codemirror-graphql
. This is a feature as graphql userland has many ways to request remote schemas. Seegraphql-tools
for example!schemas
alamonaco-json
🎉SchemaConfig
, you can provide eitherschema
,introspectionJSON
,introspectionJSONString
,documentString
anddocumentAST
as schema input.uri
that is not used for remote loading, but as a cache key and for the model uri. for definitions support, we will set an SDL string to a model at this URI that will be used for schema lookups. this can be a URL or a file URI, anything that works withmonaco.URI.parse()
. this is a common pattern with monaco, and the file URIs can either be an internal implementation detail, or can be presented to users ala vscode/codesandbox/etc, that's up to you.monaco-json
, each entry inschemas
has afileMatch
array of normal file paths or globs to match up graphql files to their schemas <3graphql-config
output could likely be mapped to this!schemas
change, the editor language features are reset