question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to pass schema to codemirror

See original GitHub issue

Hello everyone, When i passed graphql schema to codemirror like below i am getting error. I followed the steps recommended in https://github.com/graphql/codemirror-graphql/issues/255

Error: Expected { astNode: undefined, extensionASTNodes: undefined, _queryType: Query, _mutationType: null, _subscriptionType: null, _directives: [@include, @skip, @defer], _typeMap: { Query: Query, String: String, workflowTable: workflowTable, ID: ID, Boolean: Boolean, conditionsTable: conditionsTable, moduleDetails: moduleDetails, fieldUpdate: fieldUpdate, moduleData: moduleData, emailDetails: emailDetails, __Schema: __Schema, __Type: __Type, __TypeKind: __TypeKind, __Field: __Field, __InputValue: __InputValue, __EnumValue: __EnumValue, __Directive: __Directive, __DirectiveLocation: __DirectiveLocation }, _implementations: {}, _possibleTypeMap: undefined, __validationErrors: undefined, __allowedLegacyNames: [] } to be a GraphQL schema.

This is how i am using editor

let schema = buildClientSchema(interpolationQuery); let editor = CodeMirror.fromTextArea(__('gql_edit'), { mode: "graphql", lint: { schema: schema }, hintOptions: { schema: schema }, autoCloseBrackets: true, theme: "default", lineNumbers: true, textIndent: true, foldGutter: true, gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"] });

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
IvanGoncharovcommented, Jan 19, 2019

@KarthikNedunchezhiyan Please run npm ls graphql and if you see multiple versions of graphql installed please update your package.json to use the version that will satisfy all the packages.

0reactions
KarthikNedunchezhiyancommented, Jul 7, 2019

@acao sorry i have forgot this issue as it happened long before also we have dropped the plan of using codemirror-graphql instead we are using monaco editor now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CodeMirror 5 User Manual
To have more control over the new editor, a configuration object can be passed to CodeMirror as a second argument: var myCodeMirror =...
Read more >
CodeMirror System Guide
This is the guide to the CodeMirror editor system. It provides a prose description of the system's functionality. For the item-by-item documentation of...
Read more >
User Manual - CodeMirror
To have more control over the new editor, a configuration object can be passed to CodeMirror as a second argument: var myCodeMirror =...
Read more >
Add custom tags to html CompletionSource - v6 - CodeMirror
I would like to add custom VueJS components tags in the html autocompletion, but I don't know how to access the html schema...
Read more >
How update extensions after creating ? - v6 - CodeMirror
thank you for your answer. i checked that example but still can`t change keymap.of if it is outside EditorState.create extension - just one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found