Kaynağa Gözat

chore: Migrate to newer config format for graphql IDE plugin

Michael Bromley 6 yıl önce
ebeveyn
işleme
c8cc34a065

+ 5 - 0
.graphqlconfig

@@ -0,0 +1,5 @@
+{
+    "schemaPath": "schema.json",
+    "excludes": ["server/**"]
+}
+

+ 2 - 2
admin-ui/src/app/data/client-state/client-types.graphql

@@ -1,10 +1,10 @@
-type Query {
+extend type Query {
     networkStatus: NetworkStatus!
     userStatus: UserStatus!
     uiState: UiState!
 }
 
-type Mutation {
+extend type Mutation {
     requestStarted: Int!
     requestCompleted: Int!
     setAsLoggedIn(username: String!, loginTime: String!): UserStatus!

+ 0 - 22
graphql.config.json

@@ -1,22 +0,0 @@
-{
-
-  "README_schema" : "Specifies how to load the GraphQL schema that completion, error highlighting, and documentation is based on in the IDE",
-  "schema": {
-    "README_file" : "Remove 'file' to use request url below. A relative or absolute path to the JSON from a schema introspection query, e.g. '{ data: ... }' or a .graphql/.graphqls file describing the schema using GraphQL Schema Language. Changes to the file are watched.",
-    "file": "./schema.json"
-  },
-
-  "README_endpoints": "A list of GraphQL endpoints that can be queried from '.graphql' files in the IDE",
-  "endpoints" : [
-    {
-      "name": "Vendure Dev",
-      "url": "http://localhost:3000/api",
-      "options" : {
-        "headers": {
-          "user-agent" : "JS GraphQL"
-        }
-      }
-    }
-  ]
-
-}