@fraym/crud 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -8,6 +8,11 @@ Client implementation in javascript for the CRUD service [streams](https://githu
8
8
  npm i @fraym/crud
9
9
  ```
10
10
 
11
+ ## GraphQL
12
+
13
+ You can access the graphQL api at `http://crud:3000/delivery/graphql`.
14
+ There is a sandbox available at `http://crud:3000/delivery/graphql/sandbox`.
15
+
11
16
  ## CLI command
12
17
 
13
18
  Use the `crud` cli command to automatically apply your crud schemas to the crud service.
package/dist/cmd/crud.js CHANGED
@@ -200,19 +200,19 @@ const migrateSchemas = async (definitions, serverAddress) => {
200
200
  nestedTypesToCreate.push(nestedTypeName);
201
201
  });
202
202
  });
203
- if (typesToRemove.length > 0) {
204
- console.log(`Removing ${typesToRemove.length} types: ${typesToRemove}...`);
205
- await managementClient.removeTypes(typesToRemove).catch(console.log);
206
- console.log(`Removed ${typesToRemove.length} types`);
203
+ if (typesToCreate.length > 0) {
204
+ console.log(`Creating ${typesToCreate.length} types: ${typesToCreate}...`);
205
+ await managementClient.createTypes(createSchema).catch(console.log);
206
+ console.log(`Created ${typesToCreate.length} types`);
207
207
  }
208
208
  if (typesToUpdate.length > 0) {
209
209
  console.log(`Updating ${typesToUpdate.length} types: ${typesToUpdate}...`);
210
210
  await managementClient.updateTypes(updateSchema).catch(console.log);
211
211
  console.log(`Updated ${typesToUpdate.length} types`);
212
212
  }
213
- if (typesToCreate.length > 0) {
214
- console.log(`Creating ${typesToCreate.length} types: ${typesToCreate}...`);
215
- await managementClient.createTypes(createSchema).catch(console.log);
216
- console.log(`Created ${typesToCreate.length} types`);
213
+ if (typesToRemove.length > 0) {
214
+ console.log(`Removing ${typesToRemove.length} types: ${typesToRemove}...`);
215
+ await managementClient.removeTypes(typesToRemove).catch(console.log);
216
+ console.log(`Removed ${typesToRemove.length} types`);
217
217
  }
218
218
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fraym/crud",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "UNLICENSED",
5
5
  "homepage": "https://github.com/fraym/crud-nodejs",
6
6
  "repository": {