@operato/app 1.19.12 → 1.19.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/app",
3
3
  "description": "WebApplication production supporting components following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "1.19.12",
5
+ "version": "1.19.13",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -139,19 +139,21 @@
139
139
  "@codemirror/theme-one-dark": "^6.1.2",
140
140
  "@codemirror/view": "^6.22.1",
141
141
  "@graphql-tools/delegate": "^10.0.1",
142
- "@graphql-tools/wrap": "^8.5.0",
142
+ "@graphql-tools/load": "^8.0.12",
143
+ "@graphql-tools/schema": "^10.0.16",
144
+ "@graphql-tools/url-loader": "^8.0.24",
143
145
  "@material/mwc-button": "^0.27.0",
144
146
  "@material/mwc-icon": "^0.27.0",
145
147
  "@material/mwc-icon-button": "^0.27.0",
146
- "@operato/attachment": "^1.19.10",
147
- "@operato/data-grist": "^1.19.10",
148
- "@operato/font": "^1.19.10",
148
+ "@operato/attachment": "^1.19.13",
149
+ "@operato/data-grist": "^1.19.13",
150
+ "@operato/font": "^1.19.13",
149
151
  "@operato/form": "^1.19.10",
150
152
  "@operato/graphql": "^1.19.10",
151
153
  "@operato/i18n": "^1.19.10",
152
- "@operato/input": "^1.19.10",
153
- "@operato/layout": "^1.19.10",
154
- "@operato/property-editor": "^1.19.10",
154
+ "@operato/input": "^1.19.13",
155
+ "@operato/layout": "^1.19.13",
156
+ "@operato/property-editor": "^1.19.13",
155
157
  "@operato/shell": "^1.19.10",
156
158
  "@operato/styles": "^1.19.10",
157
159
  "@operato/utils": "^1.19.10",
@@ -196,5 +198,5 @@
196
198
  "prettier --write"
197
199
  ]
198
200
  },
199
- "gitHead": "79699426eaf4d1b0d476385e44dff8f5f57ff2a7"
201
+ "gitHead": "20b4eee2566c09eee30456483155e8d3ac7445d5"
200
202
  }
@@ -2,8 +2,6 @@
2
2
  * @license Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
4
 
5
- import { fetch } from 'cross-fetch'
6
- import { print } from 'graphql'
7
5
  import { css, html, PropertyValues } from 'lit'
8
6
  import { customElement, property, query } from 'lit/decorators.js'
9
7
  import { graphql } from 'cm6-graphql'
@@ -14,7 +12,9 @@ import { bracketMatching, syntaxHighlighting } from '@codemirror/language'
14
12
  import { oneDarkHighlightStyle, oneDark } from '@codemirror/theme-one-dark'
15
13
  import { EditorView, highlightActiveLine, keymap } from '@codemirror/view'
16
14
 
17
- import { introspectSchema, wrapSchema } from '@graphql-tools/wrap'
15
+ import { makeExecutableSchema } from '@graphql-tools/schema'
16
+ import { loadSchema } from '@graphql-tools/load'
17
+ import { UrlLoader } from '@graphql-tools/url-loader'
18
18
  import { GRAPHQL_URI } from '@operato/graphql'
19
19
  import { OxFormField } from '@operato/input'
20
20
  import { togglefullscreen } from '@operato/utils'
@@ -66,24 +66,16 @@ export default class OxInputGraphql extends OxFormField {
66
66
  }
67
67
 
68
68
  async getSchema() {
69
- const executor = async ({ document, variables }: any) => {
70
- const query = print(document)
71
- const uri = this.link || GRAPHQL_URI
72
-
73
- const fetchResult = await fetch(uri, {
74
- method: 'POST',
75
- headers: {
76
- 'Content-Type': 'application/json'
77
- },
78
- body: JSON.stringify({ query, variables })
79
- })
80
- return fetchResult.json()
81
- }
69
+ const uri = this.link || GRAPHQL_URI
82
70
 
83
- return await wrapSchema({
84
- schema: await introspectSchema(executor),
85
- executor
71
+ const schema = await loadSchema(uri, {
72
+ loaders: [new UrlLoader()],
73
+ headers: {
74
+ 'Content-Type': 'application/json'
75
+ }
86
76
  })
77
+
78
+ return makeExecutableSchema({ typeDefs: schema, resolvers: {} })
87
79
  }
88
80
 
89
81
  async getEditor() {