-
Notifications
You must be signed in to change notification settings - Fork 0
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: introduce monaco editor to GraphiQL #17
Conversation
}, | ||
); | ||
|
||
// @ts-ignore | ||
monaco.languages.graphql.graphqlDefaults.setSchemaUri(SCHEMA_URL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cshaver if we do this inside schema context, then it will reload schema and validations, completion, etc everything!!!
@@ -0,0 +1,122 @@ | |||
<!-- | |||
* Copyright (c) 2019 GraphQL Contributors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (c) 2019 GraphQL Contributors | |
* Copyright (c) 2020 GraphQL Contributors |
😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments but overall this is looking great. Love the codemirror->monaco before/after! 😍
@@ -12,7 +13,7 @@ import JSONWorker from 'worker-loader!monaco-editor/esm/vs/language/json/json.wo | |||
// @ts-ignore | |||
import GraphQLWorker from 'worker-loader!monaco-graphql/esm/graphql.worker'; | |||
|
|||
const SCHEMA_URL = 'https://swapi-graphql.netlify.app/.netlify/functions/index'; | |||
const SCHEMA_URL = 'https://api.spacex.land/graphql/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about this one! :D
now that this officially improves on graphql#1468, i think it's good to merge |
Co-Authored-By: Cristina Shaver <cristina.shaver@gmail.com>
use-monaco
loader for refs, state, etc. using default monaco json modeInstructions:
yarn
from the monorepo root after checking out this branchyarn build
from the monorepo rootyarn start-graphiql
from the monorepo rootSupported features
Known Issues: