Unable to pass schema to codemirror
See original GitHub issueHello 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:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
@KarthikNedunchezhiyan Please run
npm ls graphql
and if you see multiple versions ofgraphql
installed please update yourpackage.json
to use the version that will satisfy all the packages.@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.