()
| 35 | const THEME = 'vs-dark'; |
| 36 | |
| 37 | export function createEditors() { |
| 38 | const variablesModel = editor.createModel( |
| 39 | variablesString, |
| 40 | 'json', |
| 41 | Uri.file('/1/variables.json'), |
| 42 | ); |
| 43 | |
| 44 | const variablesEditor = editor.create(document.getElementById('variables'), { |
| 45 | model: variablesModel, |
| 46 | language: 'json', |
| 47 | formatOnPaste: true, |
| 48 | formatOnType: true, |
| 49 | theme: THEME, |
| 50 | comments: { |
| 51 | insertSpace: true, |
| 52 | ignoreEmptyLines: true, |
| 53 | }, |
| 54 | }); |
| 55 | |
| 56 | const operationModel = editor.createModel( |
| 57 | operationString, |
| 58 | GRAPHQL_LANGUAGE_ID, |
| 59 | Uri.file('/1/operation.graphql'), |
| 60 | ); |
| 61 | |
| 62 | const operationEditor = editor.create(document.getElementById('operation'), { |
| 63 | model: operationModel, |
| 64 | formatOnPaste: true, |
| 65 | formatOnType: true, |
| 66 | folding: true, |
| 67 | theme: THEME, |
| 68 | language: GRAPHQL_LANGUAGE_ID, |
| 69 | }); |
| 70 | |
| 71 | const schemaModel = editor.createModel( |
| 72 | schemaSdlString, |
| 73 | GRAPHQL_LANGUAGE_ID, |
| 74 | Uri.file('/1/schema.graphqls'), |
| 75 | ); |
| 76 | |
| 77 | const schemaEditor = editor.create(document.getElementById('schema-sdl'), { |
| 78 | model: schemaModel, |
| 79 | formatOnPaste: true, |
| 80 | formatOnType: true, |
| 81 | folding: true, |
| 82 | theme: THEME, |
| 83 | language: GRAPHQL_LANGUAGE_ID, |
| 84 | }); |
| 85 | |
| 86 | const resultsModel = editor.createModel( |
| 87 | resultsString, |
| 88 | 'json', |
| 89 | Uri.file('/1/results.json'), |
| 90 | ); |
| 91 | |
| 92 | const resultsEditor = editor.create(document.getElementById('results'), { |
| 93 | model: resultsModel, |
| 94 | language: 'json', |
no outgoing calls
no test coverage detected
searching dependent graphs…